- Joined
- Feb 28, 2007
- Messages
- 3,480
Hello.
I am trying to make an ability which can only be cast a limited amount of times (like the Sentinel), but I've ran into problems.
First thing, to make it easy for the player to see how many casts of the ability is left, we've made separate icons with an integer on them representing just how many casts are left. To use these icons, I made one ability per icon. Object editor part done.
As for coding, when you cast the first spell, it's removed and adds the one with the "next" icon and so on until you cast the ability with a "1" on it. Because when that's cast, the spell is removed from the unit and no other is added.
This works just fine for one unit. When you've selected several units, though, and order them to cast this ability, they'll end up with different abilities because one has the one with a "2" on it, one has a "3" on it etc. This means if you select two units with a different amount of casts left, the ability won't show up in the command panel. I've tried stuff but I haven't gotten anywhere. Care to help?
Also, the spell should be point target, so basing it off of Sentinel won't work.
Thanks in advance.
I am trying to make an ability which can only be cast a limited amount of times (like the Sentinel), but I've ran into problems.
First thing, to make it easy for the player to see how many casts of the ability is left, we've made separate icons with an integer on them representing just how many casts are left. To use these icons, I made one ability per icon. Object editor part done.
As for coding, when you cast the first spell, it's removed and adds the one with the "next" icon and so on until you cast the ability with a "1" on it. Because when that's cast, the spell is removed from the unit and no other is added.
This works just fine for one unit. When you've selected several units, though, and order them to cast this ability, they'll end up with different abilities because one has the one with a "2" on it, one has a "3" on it etc. This means if you select two units with a different amount of casts left, the ability won't show up in the command panel. I've tried stuff but I haven't gotten anywhere. Care to help?
Also, the spell should be point target, so basing it off of Sentinel won't work.
Thanks in advance.