My unit has a transform ability, which moves another unit to its position (The ability does nothing on it's own, but it's referenced in triggers when it's finished casting). When it uses it's ability to transform, I want to put the transform on a cooldown on the unit that was moved in instead of the original caster. I have 2 transform abilities labeled (Transform To Human) and (Transform To Alien) given to each unit. (Transform to Alien for Human and vice versa)
Trigger:
Event: Any Unit uses any ability command at Complete stage (ignore shared abilities)
If (Triggering Ability) =´= Transform (To Alien)
Then: Add (16) seconds cooldown to cooldown (Transform to human) on ability (Transform to human) on unit (The moved unit, which has transform to human) (Index: Triggering Player, to make triggering easier)
-- I made this for the other ability aswell --
What happens now: First time I use the ability to transform to alien: No added cooldown to (Transform to human) for the alien unit, instead it applies the cooldown to the (Transform to alien) on the Human unit.
What I want to achieve: When the Human transforms to Alien, the Alien ability (Transform back to human) gets added a 16 second cooldown via triggers and vice versa for the human.
Let me know if I'm understanding right... You have a transforming unit (similar to a siege tank), but you don't know data all that well, so you're using a dummy ability, and transporting two separate units with triggers. Is that correct?
Regardless, I think my proposed solution should work... In data you can specify an ability cool down link. Set this to the same link for both units' transformation abilities. Then you will also set the location of the cool down to player (or maybe it's called global... I'm on phone atm). Normally the location is the ability or the unit, but making it the player will make it go on cooldown for all abilities with that cooldown link for that player. And of course be sure to specify a cooldown time on the abilities as well.
I also use the triggers because I want to save the facing angle and vitals of other unit.
The data editor is really the best way to do this. A unit transforming and then back again (like a siege tank) is a pretty easy thing to do, and it's one of the first things I did when learning the data editor.
Basically just find the siege tank's abilities (Siege Tank - Siege and Siege Tank - Unsiege) and copy them. In Ability - Info you specify the unit that it turns into when transforming. Do this for both you human and alien units.
For the cooldown, do like MaskedImposter said with the cooldown link.
Doing it with the data editor is a LOT more efficient performance-wise and more reliable than using triggers. Also it should automatically retain all the unit vitals like you want (would be pretty weird if a siege tank could heal itself by tranforming).
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
My unit has a transform ability, which moves another unit to its position (The ability does nothing on it's own, but it's referenced in triggers when it's finished casting). When it uses it's ability to transform, I want to put the transform on a cooldown on the unit that was moved in instead of the original caster. I have 2 transform abilities labeled (Transform To Human) and (Transform To Alien) given to each unit. (Transform to Alien for Human and vice versa)
Trigger:
Event: Any Unit uses any ability command at Complete stage (ignore shared abilities)
If (Triggering Ability) =´= Transform (To Alien)
Then: Add (16) seconds cooldown to cooldown (Transform to human) on ability (Transform to human) on unit (The moved unit, which has transform to human) (Index: Triggering Player, to make triggering easier)
-- I made this for the other ability aswell --
What happens now: First time I use the ability to transform to alien: No added cooldown to (Transform to human) for the alien unit, instead it applies the cooldown to the (Transform to alien) on the Human unit.
What I want to achieve: When the Human transforms to Alien, the Alien ability (Transform back to human) gets added a 16 second cooldown via triggers and vice versa for the human.
Thanks for any help with this issue :)
Is there a reason you can't do this in the data editor?
In reply to jchardin64:
I have no idea how I would do this in data, as I'm not very familiar with it.
Do you know how? I would appreciate it :)
In reply to jchardin64:
I also use the triggers because I want to save the facing angle and vitals of other unit.
Let me know if I'm understanding right... You have a transforming unit (similar to a siege tank), but you don't know data all that well, so you're using a dummy ability, and transporting two separate units with triggers. Is that correct?
Regardless, I think my proposed solution should work... In data you can specify an ability cool down link. Set this to the same link for both units' transformation abilities. Then you will also set the location of the cool down to player (or maybe it's called global... I'm on phone atm). Normally the location is the ability or the unit, but making it the player will make it go on cooldown for all abilities with that cooldown link for that player. And of course be sure to specify a cooldown time on the abilities as well.
In reply to MaskedImposter:
Thank you, specifying the 'player' solved the issue!
The data editor is really the best way to do this. A unit transforming and then back again (like a siege tank) is a pretty easy thing to do, and it's one of the first things I did when learning the data editor.
Basically just find the siege tank's abilities (Siege Tank - Siege and Siege Tank - Unsiege) and copy them. In Ability - Info you specify the unit that it turns into when transforming. Do this for both you human and alien units.
For the cooldown, do like MaskedImposter said with the cooldown link.
Doing it with the data editor is a LOT more efficient performance-wise and more reliable than using triggers. Also it should automatically retain all the unit vitals like you want (would be pretty weird if a siege tank could heal itself by tranforming).