RE: I need help with creating more than 1 scripts for my custom story
(09-28-2012, 05:39 AM)Statyk Wrote: yes, notice how all the collide callbacks are given in the OnStart? This is where you set up scripts. Anything that is called from those scripts is placed outside. For example:
Notice how the callbacks are given when the player walks into a script area or uses a key on a door, and are preset in the OnStart? For example, in a sentence, it would read something like this:
"When the game starts ( void OnStart() ), add a collide callback (AddEntityCollideCallback) so when the player walks into ScriptArea_1 (AddEntityCollideCallback("Player", "ScriptArea_1", ...), it will run THIS function (..."Scary_1")."
Then true says the callback will be removed, so this function will not happen again after it happens once, and the 1 stands for being activated when the player walks into the area. -1 is leaving, and 0 is both. When the player walks into ScriptArea_1, void Scary_1 will activate and the functions inside Scary_1 will run.
Omg! I finally got it! :D So the commands on the void onstart are there to help you make more voids? Because i tried the "SetMessage("Messages", "Popup1", 0); " And i replaced the void OnEnter () with void Popup1 And it worked! Thanks for all the help! :D