I'm having an issue where moving a destructable unit via trigger is causing the footprint not to move with it. What is the best way to fix this problem?
set variable(Your unit variable) == (Last Created Unit)
After creating it with the very same trigger
"Last Created Unit" always returns the last unit created with the "Create Unit" actions. Units created by other means (Abilities, and so on) will never be the "Last Created Unit" and units created by other triggers will never be "Last Created Unit" either. (i.e. you cant reference Last Created Unit from another trigger, just the one the function is used in, so you dont have to worry about simultaneous triggers messing things up (Also, triggers cant run at the same time anyway)
"Last Created Unit" will not work after a wait action, if you want to use it or such functions ("Triggering Unit", "Attacking Unit", etc.) after using a wait in the trigger, you'll have to set them to local variables at the start and then call the variables.
I'm having an issue where moving a destructable unit via trigger is causing the footprint not to move with it. What is the best way to fix this problem?
@basballguy: Go
Destroy it and create a new one at the location you want it moved to?
@Neonsz: Go
No problem doing that if i'm able to assign units i haven't created yet to variables. However i don't know how to do that.
@basballguy: Go
so I'm looking for an answer to either fix my footprints problem, or assign units to variables once they're created.
set variable(Your unit variable) == (Last Created Unit)
After creating it with the very same trigger
"Last Created Unit" always returns the last unit created with the "Create Unit" actions. Units created by other means (Abilities, and so on) will never be the "Last Created Unit" and units created by other triggers will never be "Last Created Unit" either. (i.e. you cant reference Last Created Unit from another trigger, just the one the function is used in, so you dont have to worry about simultaneous triggers messing things up (Also, triggers cant run at the same time anyway)
"Last Created Unit" will not work after a wait action, if you want to use it or such functions ("Triggering Unit", "Attacking Unit", etc.) after using a wait in the trigger, you'll have to set them to local variables at the start and then call the variables.
@TheAlmaity: Go
thanks almaity...already tested and works...this makes my life tons easier cause now i don't have to create 300 units and move them every 5 minutes :)