View Single Post
  #7416    
Old November 6th, 2012 (10:00 PM).
itman
Back to ROM hacking. :D
 
Join Date: May 2007
Age: 21
Nature: Adamant
Quote originally posted by crystalmole:
How do I make a trigger script?
Im not sure if this i the right place to post this and I hope im not requesting a script, but I want to know the basics of making a trigger script like one that prevents you from advancing in an area until a certain flag is set.
Basically, in a part of your trigger your script, you are going to want to check if a separate event happened first before it activates: then it goes to the right script depending on whether the event happened or not.

So somewhere in your trigger script, you'll need to put a:
checkflag 0x200 (or any other flag number)
if 0x1 goto @done (or any pointer)


It'll make the script check if another event has happened yet. Therefore, in a separate event, you'll need to put a:
setflag 0x200 (the same flag number we are checkign for above)
When that flag is set, the trigger script will check and see that the event already happened, and allow you to do anything you want (advance into next area, etc..)