Jump to content

Script problem


SupermassiveBlackHole

Recommended Posts

Hi, I'm trying to make a script on a switch that opens a secret door when activated. I'm using references. The script seems fine to me, and will save, but in game, when I activate the switch in-game it doesn't open the door.

 

Here's the script:

 

scn 000ACTIPBSSecretSwitch01SCRIPT

 

Begin OnActivate

if aaaACTIPBSSecretDoor01REF.GetOpenState 0

aaaACTIPBSSecretDoor01REF.SetOpenState 1

Endif

Else

aaaACTIPBSSecretDoor01REF.SetOpenState 0

Endif

End

 

Thanks for reading. Kudos will be rewarded to whoever fixes this for me :thumbsup:

Edited by xiiROSS
Link to comment
Share on other sites

Didn't I already answer this in another thread. You need to remove your first endif, or else the ELSE will not run, and will not open the door.

 

Cheers.

 

That was a different script, for a lightswitch. Quite similar though, but I am a numpty with scripting.

 

Thanks for responding, kudos to you.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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