• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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