Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Comments on Profile Post by FreedomEra

  1. AGD
    The reason we use TriggerAddCondition() instead of TriggerAddAction() is because it performs faster than the later (There are benchmarks supporting this I think). And the reason we return FALSE is so that the trigger doesn't attempt to run the triggeractions (which is empty in this case, but still has an overhead - like calling TriggerExecute() on a trigger with no actions) when for example there is only one triggercondition registered and it returns TRUE.
    Sep 17, 2017
  2. AGD
    The only downside in using TriggerAddCondition is that you can't have TriggerSleepAction() inside the code but well, TSA is prone to errors in some cases and it's safer to just use a timer usually.
    Sep 17, 2017
  3. FreedomEra
    Thank you, my friend! I have been learning Jass for over 2 months now and still find myself in the middle of nowhere. Do you have any tips for learning Jass?
    Sep 21, 2017
  4. AGD
    I don't know what's your current 'level' in working with jass so I'll just assume that I'm talking to a beginner (If you don't mind).

    Firstly, I recommend you to download WEX or JNGP because of their useful tools even for beginners (like syntax highlighter and premade jass functions list for example).

    Then, from my experience, it is better to read some basic tutorials like how a GUI triggers looks like behind the scenes (when it's converted to jass), then when you get understand the general format and syntax, try to look for some sample spells or just any sample codes that can usually be found at the end of some tutorials because those examples are meant for starters. Try to tweak some parts of the code then see how it affects the output in-game.
    Sep 23, 2017
  5. AGD
    To be able to write your own code in jass, you need to understand what are these:
    - 'triggers' (In Jass, because they're known differently in the context of GUI)
    - What is needed for a trigger to work - i.e., triggerevents, triggerconditions, and triggeractions
    - Initialization functions
    - Initialization triggers
    - jass syntax (obviously)
    - jass objects (including how to create and work with them)
    - custom jass functions (how to make one)

    I suggest you follow the list in order, good luck!
    Sep 23, 2017