• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Spell question, Order problem.

Status
Not open for further replies.
Level 15
Joined
Nov 26, 2005
Messages
1,151
So, I am still making the heroes for my Space Orc Map.
THe next thing I need help about is the following spell:

The unit becomes invisible. When it attacks it will deal damage. If the unit moves or casts a spell the invisibility buff is removed.
I did everything expect for the order part...
How can I 'tell' when a unit moves ??
How would this spell look like, at all ?

Can you help, guyz ? +Rep for helpful answers
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Add the unit to a unit group when the spell begins. Save the position of the unit into a hashtable or into some array.

Create a trigger that picks every unit in that group every 0.10 seconds for example. Check whether the current position of the unit is the same (or very very close) to the original position. Check the distance.
 
Status
Not open for further replies.
Top