Question about door script

Post » Sat Feb 19, 2011 6:41 am

I know this should be easy, but it's slaying me so far. I'm trying to make a simple script that pops up a message if the door is locked, or activates the door like normal if it's unlocked. I have a different script that unlocks the door when a trigger is activated. The part I can't get past so far is the syntax for checking whether the door is locked or unlocked when it's activated. Can anyone give me an example of how you do that? I had no luck finding it on the cs wiki.
User avatar
Emily abigail Villarreal
 
Posts: 3433
Joined: Mon Aug 27, 2007 9:38 am

Post » Sat Feb 19, 2011 5:04 am

Just

If Ref.getlocked
door is locked, so do something
else
door is unlocked, do something else.

Unless you get really complicated, you'll need a script on the door anyway with an Onactivate block, so you can skip the ref and just use "if getlocked", I think.

Is it skipping the onactivate block and going directly to the lockpick menu or something?


By the way, since your questions keep getting moved to the CS forum, why not post them there in the first place?
User avatar
Thomas LEON
 
Posts: 3420
Joined: Mon Nov 26, 2007 8:01 am

Post » Sat Feb 19, 2011 7:20 am

I'll give that a shot. Actually, I didn't realize they were getting moved. Haven't been paying attention, I guess. But I will, thanks
User avatar
Sharra Llenos
 
Posts: 3399
Joined: Wed Jan 17, 2007 1:09 pm


Return to IV - Oblivion