Nov 4, 2013 at 6:19 PM
Join Date: Jan 4, 2013
Location:
Posts: 53
Maaaan, thanks. You really cleared something up for me. (Specifically, how <CNP command actually works)MagicDoors said:Bombchu made a really unclear explanation.
Flags are used for checking whether things have happened or not. Setting a flag with <FL+XXXX (where X is the flag number you want) will keep the flag set unless the player loads the game to a point before the flag set. <FLJXXXX:YYYY (where Y is a desired event number) will jump to event Y if flag X is set.
Another command you'll need is <CNPXXXX:YYYY:ZZZZ. X is the desired entity event number, Y is the desired NPC value, and Z is the direction. CNP changes an entity with event number X to type Y with direction Z. You can use this to change a blank entity to a door by putting it in your script. After this, set a flag. In the door/exit script, put a flag jump relative to the flag you set. If the flag is set, make the game jump to an event that shows a message saying "the door is locked" or something to that effect. After whatever you want happens in your room, unset the flag. That will allow the player to run the original door/exit script and exit the room.
Hopefully I explained everything. If I missed something please tell me.
Oh, also, to make an entity activate when pressing down, make sure special flag 2000 is set for the entity. The entity will play the event corresponding with its event number when you press down in front of it.
TSC Is really not that difficult, you just have to think out of the box with some things.