Depends on how you realize your projectiles and your physics engine. If you move the unit instantly in a short interval, you could probably just go with a function and a wait and save the target in a local variable. For other projectiles, this might not be that easy; you could create a missile stack with arrays or using the data table. You can also use the projectile unit's custom value for it.
Depends on how you realize your projectiles and your physics engine. If you move the unit instantly in a short interval, you could probably just go with a function and a wait and save the target in a local variable. For other projectiles, this might not be that easy; you could create a missile stack with arrays or using the data table. You can also use the projectile unit's custom value for it.
I'm thinking some sort of recycling array that uses a custom value as a marker,
for now though, I'm just using a variable array for valid targets, then setting the custom value of the projectile to the number of the target I want it to hit.
This works for my map since there are only 14 valid targets, but wouldn't work very well if everything in the map was a target. :S
Rollback Post to RevisionRollBack
Zergling Blood : starcraft://map/1/35684
Game of Thrones : starcraft://map/1/189756
Tacticraft : starcraft://map/1/223625
To post a comment, please login or register a new account.
so I want to make a projectile that locks on to a target unit.
This projectile is done through triggers though, for the sake of the physics engine.
I need a way of saving the "target unit" to the projectile, for later use.
Edit: this was meant for Triggers :O
Depends on how you realize your projectiles and your physics engine. If you move the unit instantly in a short interval, you could probably just go with a function and a wait and save the target in a local variable. For other projectiles, this might not be that easy; you could create a missile stack with arrays or using the data table. You can also use the projectile unit's custom value for it.
I'm thinking some sort of recycling array that uses a custom value as a marker,
for now though, I'm just using a variable array for valid targets, then setting the custom value of the projectile to the number of the target I want it to hit.
This works for my map since there are only 14 valid targets, but wouldn't work very well if everything in the map was a target. :S