• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Unit Inquiries

Status
Not open for further replies.
Level 3
Joined
Jul 30, 2013
Messages
25
Greetings. I would like to create a hero which is similar to a champion in League of Legends, Jayce, which transforms into other unit with different sets of abilities. It is just like Druid of the Talon <--> Crow Form. However, the problem is the cooldown. Change to other form simply resets whole ability.

How to solve this? Thank you.
 
Level 3
Joined
Jul 30, 2013
Messages
25
Hmm, I forgot to elaborate more on my problem.

The problem is this. For example, in my base form, I got blink skill. Then, I use it. The skill is on cooldown, let's say 15 seconds cooldown. Then, I switch form and quickly switch back to base form. The form switching takes 3 seconds, for example. And then my blink skill should have less than 12 seconds cooldown. However, this is not the case. The blink ability cooldown is reset.
Unlike Jayce in LoL, you use Acceleration Gate, then Transform to Hammer, then Transform back again to Cannon, at least Acceleration Gate is still on cooldown. So, I want that kind of hero.

How to solve this? Thank you.
 
When the unit use fx. Blink, then start a timer equal to the cooldown of blink.

When you change form from secondary to primary run a check if the timer is still running.
If yes, then disable Blink.

In another trigger you have the event: A timer expires.
When this happens you enables the Blink ability again.

You need a timer for each of the abilities with cooldowns.
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
as long as the player has no other units that share the exact abilities, then detect when your Unit transforms, disable all abilities that should be on base form, enable all that should be on the alternate. do the opposite to reverse.
(Use metaphor)
you probably have too many abilities to add them all in the object editor. So on map initialization, add all necessary and disable all that should NOT be active initially for the proper form

edit: I'm sorry I can't see your name, on my phone, but don't use that timer method as its unnecessary and could potentially leave you with no abilities as, as soon as you cast them, it disables it meaning it is removed from the command card and you are unable to level it up.
 
Level 3
Joined
Jul 30, 2013
Messages
25
@Solu9, this idea I have thought about it. Just that I want the skill cooldown to be shown visually instead of using countdown timer as the way of using countdown timer for me is somehow feeling uneasy, especially when using targeted spell which is on cooldown, after cast to a target, gets error message then you know it is on cooldown. Feeling annoyed =S

Well, I guess I have to compromise...
 
Level 10
Joined
Apr 18, 2009
Messages
601
Maybe you can trigger it yourself like: when dummy activatable morph ability is used, hide the hero and create the morphed version. This might come with some bugs that I have not fully considered though? How about buffs on the unit for example?
 
Level 20
Joined
Jul 6, 2009
Messages
1,885
@Solu9, this idea I have thought about it. Just that I want the skill cooldown to be shown visually instead of using countdown timer as the way of using countdown timer for me is somehow feeling uneasy, especially when using targeted spell which is on cooldown, after cast to a target, gets error message then you know it is on cooldown. Feeling annoyed =S

Well, I guess I have to compromise...

So why are you not using pOke's solution?
 
as long as the player has no other units that share the exact abilities, then detect when your Unit transforms, disable all abilities that should be on base form, enable all that should be on the alternate. do the opposite to reverse.
(Use metaphor)
you probably have too many abilities to add them all in the object editor. So on map initialization, add all necessary and disable all that should NOT be active initially for the proper form

edit: I'm sorry I can't see your name, on my phone, but don't use that timer method as its unnecessary and could potentially leave you with no abilities as, as soon as you cast them, it disables it meaning it is removed from the command card and you are unable to level it up.

Hmm you got a point about the level up bit.
But with the method you posted doesn't the initial problem with cooldown become apparent again?

Unless of course the cooldown is not reset once the ability is enabled again.
 
Level 3
Joined
Jul 30, 2013
Messages
25
Well, I know how to make this kind of hero. Just want to know how to get the cooldown image or visual.
 
Level 20
Joined
Jul 6, 2009
Messages
1,885
Well, I know how to make this kind of hero. Just want to know how to get the cooldown image or visual.

Give all of the abilities (from normal and alternate form) to both unit forms.
At map initialization, disable all alternate form's abilities (using Player - Disable Ability in GUI, assuming you're using GUI).
Detect when the unit changes form (try using unit finishes casting or finishes channeling spell for event) and enable abilities of form unit was transformed into and disable previous form's abilities.
You can have a boolean to determine whether unit is in alternate or normal form (to disable abilities accordingly) and change boolean's value on each transformation.

This will only work well if you have at most one instance of your unit per player. Depending on the circumstances, there could be workarounds for multiple units per player.
 
Level 3
Joined
Jul 30, 2013
Messages
25
Disabling ability is just letting player cannot see and touch the ability for every unit, but the ability still exists, right?
 
Level 3
Joined
Jul 30, 2013
Messages
25
Even if it is disabled, can I still use the trigger to issue an order to cast the ability?
 
Status
Not open for further replies.
Top