• 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.

Timed/temporary/chain ability

Status
Not open for further replies.
Level 3
Joined
Aug 19, 2020
Messages
38
Good afternoon,
I want to make an ability that when you use it, it gives you another ability in a short period of time.
And the second ability replaces the first ability ( the icon position etc. )
it's like when I use ability A , A changes into B, and when I cast B, A is back and the cooldown is correct.
( Precisely, its the ability of alchemist or crusader from The World RPG )
However I can't find any resource here, does anyone know how to achieve it? Thank you.
 
What's your wc3 version? If it's 1.29 or newer, you could do something like this:

  • Sample GUI
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Animate Dead
    • Actions
      • Unit - Add Attribute Bonus to (Triggering unit)
      • Unit - For (Triggering unit), Ability Animate Dead, Hide ability: True
  • Sample GUI 2
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Attribute Bonus
    • Actions
      • Unit - For (Triggering unit), Ability Animate Dead, Hide ability: False
      • Unit - Remove Attribute Bonus from (Triggering unit)
Adding a timeout to the second ability might need more complex triggering, so I'll leave it as is.
 
Hmm, in that case, try using a disabled custom spellbook ability instead. Add your desired ability to the list of abilities used by the spellbook. It'll require more setup, but the outcome will hopefully be the same.

Unit creation event:
  • Sample GUI 3
    • Events
      • Unit - A unit enters (Entire map)
    • Conditions
      • (Level of Animate Dead for (Triggering unit)) Greater than 0
    • Actions
      • -------- GetTriggerUnit() refers to Triggering unit, --------
      • -------- while AUan refers to the rawcode of Animate Dead, --------
      • -------- You can replace AUan with the rawcode of your custom ability --------
      • -------- ---------------------------------------------- --------
      • -------- UnitMakeAbilityPermanent makes a unit's ability permanent --------
      • -------- First argument refers to the unit, ---------
      • -------- Second argument refers to the permanent flag --------
      • -------- Last argument refers to the ability being made permanent --------
      • Custom script: call UnitMakeAbilityPermanent(GetTriggerUnit(), true, 'AUan')
Spellbook Setup:
  • Sample GUI 4
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- We disable the custom spellbook ability for all players --------
      • -------- so that the sub-spells from the spellbook ability will remain hidden --------
      • -------- but usable. --------
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Disable Spell Book for (Picked Player)
Rewriting the triggers above to consider 1.24:
  • Sample GUI
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Animate Dead
    • Actions
      • Unit - Add Attribute Bonus to (Triggering unit)
      • Unit - Add Spell Book to (Triggering unit)
  • Sample GUI 2
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Attribute Bonus
    • Actions
      • Unit - Remove Spell Book from (Triggering unit)
      • Unit - Remove Attribute Bonus from (Triggering unit)
 
Level 3
Joined
Aug 19, 2020
Messages
38
Thank you again.
However it seems that it does not work as I wish.

Then I tried something with disabling the first ability, and it seems to be ok.
Anyways, thanks for helping again!
 
Status
Not open for further replies.
Top