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

How to delay mana replenish/Spirit Touch?

Status
Not open for further replies.
Level 8
Joined
Apr 23, 2011
Messages
322
I need a trigger or something to "delay" mana replenish/spirit touch.
Meaning:Hero casts "mana replenish/spirit touch" and after x seconds he will recover x mana to himself.
Hero can move, but some abilities and attack will be disabled while he waits for mana to come.
Hero can only use move, patrol and hold position.

It would be great if hero could play a certain animation during the wait, even when moving, if that is possible.
It can be based on any instant ability I guess.

p.s.:my wc3 is currently dead so I won't really know if the trigger will work, so I can wait.

Edit:Hero can't drop items during the wait and can't activate "defend".
 
Last edited:
Level 33
Joined
Mar 27, 2008
Messages
8,035
Hero can move, but some abilities and attack will be disabled while he waits for mana to come.
Hero can only use move, patrol and hold position.
You have to specify which ability(es) doesn't get affected.

It would be great if hero could play a certain animation during the wait, even when moving, if that is possible.
It can be based on any instant ability I guess.
If I just attach SFX to the unit, is this acceptable ?

Does the cooldown of the spell > time taken for the spell to take effect ?
 
Level 8
Joined
Apr 23, 2011
Messages
322
This is how far I got:

-Event
Unit starts effect of ability
-Condition
Ability cast=DelayedMana
-Action
local unit udg_u
set u = triggering unit
order NeutrAlallseeingDummyInTheCornerOfTheMap to Soul Burn/DrunHaze u
remove "defend" from u
remove "sorm bolt" from u
Wait 5 sec
set u's mana to 100%
add "defend" to u
add "storm bolt" to u

According to rullerofiron99 this is MUI and correct.(my wc3 is still dead so I can't test it)

You have to specify which ability(es) doesn't get affected.

They will be removed and added again.

If I just attach SFX to the unit, is this acceptable ?

Close enough I guess.

Does the cooldown of the spell > time taken for the spell to take effect ?

cooldown=5 sec, wait=5 sec.When you activate the ability it goes to cooldown, so when it's ready to be used again, you gain mana (can't be used if mana is full)[ability is not silenced so you can see it ticking]
 
Level 8
Joined
Apr 23, 2011
Messages
322
makes a test map :D
are-you-fucking-kidding-me-face_design.png

nvm, I suppose it works so thank you very much defskull
Thread may be closed.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Hahahahaahah I'm so sorry, here's a full trigger :/

  • RS Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set RS_Delay = 5.00
      • Set RS_RegainValue = 50.00
      • Set RS_Defend = Defend
      • Set RS_StormBolt = Storm Bolt
      • Set RS_Ability = Regain Spirit
      • Set RS_DelaySFX = Abilities\Spells\Other\Drain\ManaDrainCaster.mdl
      • Set RS_GainSFX = Abilities\Spells\Items\AIma\AImaTarget.mdl
      • Set RS_AttachmentPointDelay = overhead
      • Set RS_AttachmentPointGain = overhead
  • RS Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to RS_Ability
    • Actions
      • Custom script: local unit caster = GetTriggerUnit()
      • Custom script: local effect sfx = AddSpecialEffectTarget(udg_RS_DelaySFX, caster, udg_RS_AttachmentPointDelay)
      • Custom script: call UnitAddAbility(caster, 'Abun')
      • Custom script: call UnitRemoveAbility(caster, udg_RS_Defend)
      • Custom script: call UnitRemoveAbility(caster, udg_RS_StormBolt)
      • Wait RS_Delay seconds
      • Custom script: call UnitRemoveAbility(caster, 'Abun')
      • Custom script: call UnitAddAbility(caster, udg_RS_Defend)
      • Custom script: call UnitAddAbility(caster, udg_RS_StormBolt)
      • Custom script: call SetUnitManaBJ(caster, GetUnitStateSwap(UNIT_STATE_MANA, caster) + udg_RS_RegainValue)
      • Custom script: call DestroyEffect(sfx)
      • Custom script: call DestroyEffect(AddSpecialEffectTarget(udg_RS_GainSFX, caster, udg_RS_AttachmentPointGain))
      • Custom script: set sfx = null
      • Custom script: set caster = null
 
Status
Not open for further replies.
Top