- Joined
- Sep 3, 2009
- Messages
- 458
So I as wondering if this would work.
You first create a integer variable. Let's call it MaxValue which is at the start 0.
Now when a unit (considering conditions; a ground unit, a hero etc.) enters the map you set MaxValue = MaxValue + 1. Then set that unit's custom value to MaxValue. I can describe this as IDing a unit so that you can just use, let's say, FireCaster[customvalueofunit] since the value will always be unique to that unit.
Also when a temporary unit let's say, a creep dies, then we can do MaxValue = MaxValue - 1. Won't this maybe make triggering easier. Haven't tested yet, I was just wondering a few days ago cause it there was a massive blackout.
Your thoughts?
You first create a integer variable. Let's call it MaxValue which is at the start 0.
Now when a unit (considering conditions; a ground unit, a hero etc.) enters the map you set MaxValue = MaxValue + 1. Then set that unit's custom value to MaxValue. I can describe this as IDing a unit so that you can just use, let's say, FireCaster[customvalueofunit] since the value will always be unique to that unit.
Also when a temporary unit let's say, a creep dies, then we can do MaxValue = MaxValue - 1. Won't this maybe make triggering easier. Haven't tested yet, I was just wondering a few days ago cause it there was a massive blackout.
Your thoughts?