• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Plainswalker spell help

Status
Not open for further replies.
Level 12
Joined
Apr 27, 2008
Messages
1,228
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:
Level 12
Joined
Apr 27, 2008
Messages
1,228
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).
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
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.
Top