Detecting Orders

zepho

New Member
Reaction score
0
How do I detect (in JASS) if unit moves, casts a spell or attacks a unit? For example, when a unit starts the effect of an ability, add another ability to it. Then, when unit moves, casts a spell or attacks a unit, the ability added will be removed. How will I do that?
 

Tyrulan

Ultra Cool Member
Reaction score
37
This sounds simple to do - in JASS or otherwise.

You need two triggers; the first will have one event polling for the ability you have in mind. The second will have three events: unit moves, unit casts, unit attacks. Its conditions however, must require the triggering unit to have the added ability.

The rest is easy.

Let me know if you need more help with this.
 

zepho

New Member
Reaction score
0
The ability I am making is a phase-shift spell based on Faerie Dragon's Phase Shift but not auto-cast. When I use the phase shift ability, add Invulnerable ability ('Avul') to it, then wait .75+(.5 x level of ability) if the unit has no action. But if the unit moves, casts or attacks a unit, remove the Invulnerable ability.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top