I create units in a trigger, and set their experience to a specific numbers. I just want to use experience field as array index to adress created units properties. But it doesn't work. I check the value of experience field after I set it to 1, but it's still 0... Do I miss something? How can I set units experience and it to keep the number?
You could use custom value. It is designed for these kind of applications.
Setting experience via trigger does not work properly, afaik. However, you can execute a modify unit effect on the unit via trigger, which can modify a unit's experience.
What custom value? Does units have some unused fields which we can use to store some info? I actually just used unit's speed (it's a building, so the speed field is unused) instead of experience, and now it works.
Custom value is an integer each unit possesses, which can be checked and modified at will via trigger.
It does not have any other use besides storing information. It has multiple slots for you to use, to store multiple numbers in this unit.
I create units in a trigger, and set their experience to a specific numbers. I just want to use experience field as array index to adress created units properties. But it doesn't work. I check the value of experience field after I set it to 1, but it's still 0... Do I miss something? How can I set units experience and it to keep the number?
You could use custom value. It is designed for these kind of applications.
Setting experience via trigger does not work properly, afaik. However, you can execute a modify unit effect on the unit via trigger, which can modify a unit's experience.
What custom value? Does units have some unused fields which we can use to store some info? I actually just used unit's speed (it's a building, so the speed field is unused) instead of experience, and now it works.
Custom value is an integer each unit possesses, which can be checked and modified at will via trigger.
It does not have any other use besides storing information. It has multiple slots for you to use, to store multiple numbers in this unit.
Oh, cool! Just found it! Thanx!