[Trigger] Plainswalker spell help

Status
Not open for further replies.
First thing that comes to my mind.
When Learned store the current position of the unit to a variable.
Turn on a trigger:
Use a trigger that runs every 0.25 seconds.
Set the current position of the unit to a variable.
Set a variable(global, like "abv") to false
Check the distance between the previous location and the current.
If the distance is more than 0 and if abv equal to false do something(give it item abilities) and set abv to true
If the distance is 0 and abv=true than remove those skills and set abv=false.
Then store the current position in the first variable.
If globals are used this will not be MUI.
If arrays with indexes of Player numbers are used it will be PUI.
If a timer(instead of a trigger) is used and an attachment system is used then it can be MUI.
 
Last edited:
I doubt a periodic event (0.25 seconds) with only 1 or 2 units might cause any lag(even with 8, if we are talking about heroes).
 
He said hero.
Oh, I have to adjust that a bit.
And even if it is for units, than just a simple increase of the interval between executions is required to like 1 second.
Won't make a big difference.
 
Status
Not open for further replies.
Back
Top