Making Events (part 2)BeginnersAlright let's actually teach you how make your own event, the first thing you need to do is specify the event number. Make sure, that the new event number is in its own line.
(commands)
(commands)
(commands)
Making your event numbers less than 4 digits can make your game act weird or not run the event at all. I would also advise not making your event numbers below 100. Why? Because there are a few global events and setting an event number that is lower than 100 may overide one of them and mess alot of things up, and possibly even make your game crash. You really shouldn't need more then 9899 different events on one map though...
When you write events in the normal script, those events are considered "local" Only the map that you wrote them in is affected.
They would only run the event #0100 in their respective scripts.
then you would need to write the event in the something like the Head.tsc file.
given these events, so if you try to interact with them without setting these numbers, they will do nothing.
Any NPC can be given these event numbers and they'll do the exact same thing.
In the example, the events do the following: • Event #0090 is a normal entry event. • Event #0200 is for a npc that heals(and refills ammo) the player when they touch the npc and makes a sound to confirm this, and then waits for a second to make sure it doesn't keep looping 50 times a second till the event ends. • Event #0500 is a normal exit through door event that brings the player to map 23. Now, when event #0200 is called for in normal cases, it would heal the player and everything. However, since event #0500 is above it and has a higher event number, that event gets called first, making the player go to map 23, and worst of all is that the player doesn't get healed. You don't want that to happen when you touch a npc that is supposed to heal you. This is why you want the events in the correct order.
Let's go over the commands in the simple message event as an example.
PRI
It'd be pretty weird if the player could just jump around the whole room while the NPC was talking to them.
*When the game is reading the script, and see's the MS3 command, it knows to display a text box at the top of the screen and display a message. However, once the game got to the end of the message, it would immediately move on to the next command. In this case, that next command would be the END command. The END command would then close out the message box, and end the current scripted event. So what would happen, is that the message box would type in "Hello Quote." but then as soon as it reached the end of the message, the text box would just close out. Giving the player very little time to read the message. But if you put this command in, the game won't continue to the next command until the player has pressed the jump button. Allowing the player to be able to read the message box, and move on once they're done reading it.
And in most cases that would be something that you don't want to happen. *If you don't have any scripted events below, then the game would go back up to the top of the script, and start reading from there.
*Couldn't type it in because of the html format.
And the 3 characters after it define WHICH command it is.
Previous Lesson: Making Events Next Lesson: Arguments |