Beginners question

Bronxernijn

You can change this now in User CP.
Reaction score
43
I have read some JASS tutorials and I am an experienced programmer, so that is not the problem.

The problem is that I do not understand how and when triggers run. For example, I looked through the triggers of a space shooter map which was made in JASS, but I couldn't discover any sort of event. So how does this work?

PS. I don't need a long answer, all I need is a little push in the right direction.

Thanks!
 

Romek

Super Moderator
Reaction score
963
Triggers run when their event is 'triggered'.
For example:

Trigger 'T' will run when a unit owned by Player 0 dies.

If you're talking about functions. Then in vJass, when declaring a scope or library, you can add an initializer.
For example:
JASS:
library Hello initializer Init

private function Init takes nothing returns nothing
endfunction

endlibrary

'Init' is the name of the function that will be run at map initialization in this case.

You could do "initializer CreamCheese", and a function called "CreamCheese" would be run at map initialization.
 
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top