Welcome to the Achaea Forums! Please be sure to read the Forum Rules.

[HTML5] Trigger in an alias script

How does one create a trigger in an execute script box of an alias? Is there a #WAITFOR kind of trigger line that will allow me to do a certain action based on that? I really want to learn how to create/code triggers in a script. Temporary triggers or triggers only recognized within that script would probably be ideal. Ex: If I get equilibrium balance back, then do such and such. Any help will be greatly appreciated. Thanks! (Note: I have thought about using a function, but that still leaves the problem of coding a kind of waitfor trigger line before proceeding with the other commands type of situation. heh)
Tagged:

Comments

  • ArkhuroArkhuro Posts: 1Member
    edited April 2015
    I haven't tried creating triggers in code, but I know that you can enable or disable triggers there.

    So for example, you could create a trigger called EqBal that is disabled by default (uncheck the checkbox beside it). Now you can enable EqBal in your alias using:
    reflex_enable(reflex_find_by_name('trigger', 'EqBal'));


    Don't forget to disable EqBal once it's done doing its thing; you could just add
    reflex_disable(reflex_find_by_name('trigger', 'EqBal'));
    at the very end of EqBal's code.
Sign In to Comment.