filt |
This may be a newbie questions. But i need some help. I want to be able to lock and unlock doors without opening them. But i cant find a way to check if the door is locked or not.
This checks of i have the key.
This checks if the door is open. But i cant find a way to check if the door is locked... And then i have another problem...
If i want the (method (doit) , where should i put it?.. it seems as it doesnt work anywhere for me. I know the questions may be lame, but im new to this...
|
Eigen |
Hope this helps. Add var DoorOpened = FALSE under Main.sc Here's the code: (if(Said('unlock/door')) (if(send gEgo:has(INV_TEST_OBJECT)) Print("You use your key to open the door.") = DoorOpened TRUE return ) Print("You don't have a key.") ) (if(Said('take/key')) (if(send gEgo:has(INV_TEST_OBJECT)) Print("You alredy took it.") return ) Print("OK") (if(send gEgo:get(INV_TEST_OBJECT)) ) ) (if(Said('open/door')) (if(send gEgo:has(INV_TEST_OBJECT)) if(DoorOpened) (aDoor: open) return ) Print("It's locked.") return ) -Eigen |
filt | I just cant get it to work. I cant find where to add "var DoorOpened = FALSE" in Main.sc |
Eigen |
In Main.sc don't use "var DoorOpened = FALSE" but "DoorOpened = FALSE"Add it right after: gTheMusic |