Jump to content

Make this script Enable only


antstubell

Recommended Posts

I've got this script on a Pullbar which Enables a Portal and a Light. Works fine but I only want it to Enable. If I add the DoOnce command to the script I can turn on the objects once but can disable them once too then the Activator is dead. I want it to turn on/Enable the objects and nothing more.

 

 

bool property isInPullPosition = True Auto

 

 

ObjectReference Property MyLight1 Auto

ObjectReference Property MyLight2 Auto

 

EVENT onActivate (objectReference triggerRef)

 

IF (isInPullPosition)

MyLight1.enable()

MyLight2.enable()

isInPullPosition = False

else

MyLight1.disable()

MyLight2.disable()

isInPullPosition = True

endIF

 

endEVENT

 

 

Thanks.

Link to comment
Share on other sites

bool property isInPullPosition = True Auto

ObjectReference Property MyLight1 Auto
ObjectReference Property MyLight2 Auto

EVENT onActivate (objectReference triggerRef)

IF isInPullPosition
	isInPullPosition = False
	MyLight1.enable()
	MyLight2.enable()
endIF

endEVENT

Link to comment
Share on other sites

bool property isInPullPosition = True Auto

ObjectReference Property MyLight1 Auto
ObjectReference Property MyLight2 Auto

EVENT onActivate (objectReference triggerRef)

IF isInPullPosition
	isInPullPosition = False
	MyLight1.enable()
	MyLight2.enable()
endIF

endEVENT

 

 

Thank you Steve40

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...