newbie scripter: Door switch
Posted: Sat May 03, 2003 11:45 am
Hi
I want to have a lever that operates two doors.
if switched it locks the one door, and unlocks the other, and giving a message which one is locked now.
If switched again, it unlocks the first, and locks the other, again giving a message.
I've puzzled out how to do if, but how to query the states of objects is beyond me, I've just started looking at the scripting thing.
so I want to do:
if (door1.locked)
door2.lock
door1.unlock
tell "Door 1 open now"
else
door1.lock
door2.unlock
tell "door 2 open now"
fi
how to do that in NWNScripting ?
Have I seen that right that there isn't an "else" in NWNScripting ?
I want to have a lever that operates two doors.
if switched it locks the one door, and unlocks the other, and giving a message which one is locked now.
If switched again, it unlocks the first, and locks the other, again giving a message.
I've puzzled out how to do if, but how to query the states of objects is beyond me, I've just started looking at the scripting thing.
so I want to do:
if (door1.locked)
door2.lock
door1.unlock
tell "Door 1 open now"
else
door1.lock
door2.unlock
tell "door 2 open now"
fi
how to do that in NWNScripting ?
Have I seen that right that there isn't an "else" in NWNScripting ?