View Single Post
Old November 6th, 2012 (10:00 PM).
itman itman is offline
Back to ROM hacking. :D
    Join Date: May 2007
    Age: 23
    Nature: Adamant
    Posts: 100
    Originally Posted by crystalmole View Post
    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..)