- Joined
- Sep 11, 2006
- Messages
- 142
Hey, ive noticed in games where you have alot of ranged units firing at enemies, usually you get these huge triangles of arrows or whatever the projectile is, on a single target. I think this looks a bit wierd, and seeing as im making a map where strategy is the objective, i dont want ten million arrows that could each one hit kill the target go after one target. So my request is; Can you please make me a system that makes archers target different targets from the others so i dont get clouds of arrows over a single unit?
Edit: I have a few ideas on how you could do this, not sure if it would work... how about when a unit acquires a target or something, the targeted unit gets a custom value of one, which means its targeted, and then give the attacker that same custom value. So a trigger starts whenever a unit acquires a target, that checks that its custom value is zero, so it can target it. and in that trigger if the custom value is not zero, then it checks to see if the acquiring unit has the same custom value as the targeted unit which means it is allowed to fire. If all the checks come out false then the unit is told to stop and target something else. Plus to prevent them all targetting the same thing like before, everytime something is targetted an integer variable is given plus one which is the amount of units targetted. And everytime a unit is targetted its custom value is set to the integer and then the integer variable is increased by one.
please give some feedback on this, not sure if its possible or if its practical.
Thanks in advance
Maximash.
Edit: I have a few ideas on how you could do this, not sure if it would work... how about when a unit acquires a target or something, the targeted unit gets a custom value of one, which means its targeted, and then give the attacker that same custom value. So a trigger starts whenever a unit acquires a target, that checks that its custom value is zero, so it can target it. and in that trigger if the custom value is not zero, then it checks to see if the acquiring unit has the same custom value as the targeted unit which means it is allowed to fire. If all the checks come out false then the unit is told to stop and target something else. Plus to prevent them all targetting the same thing like before, everytime something is targetted an integer variable is given plus one which is the amount of units targetted. And everytime a unit is targetted its custom value is set to the integer and then the integer variable is increased by one.
please give some feedback on this, not sure if its possible or if its practical.
Thanks in advance
Maximash.
Last edited: