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

No Cooldown, Why?

Status
Not open for further replies.
Hello =)

So I've made this spell, everything works just fine, but spell doesn't go in cooldown, why?

I use Carrion Swarm as a base spell, and it has 10 seconds cooldown.

  • Aqua Burst
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Aqua Burst
    • Actions
      • -------- ------------------------------------------------------------------------------------------------- --------
      • -------- Getting the Spell constants --------
      • -------- ------------------------------------------------------------------------------------------------- --------
      • Set Aqua_Burst_Caster = (Triggering unit)
      • Set Aqua_Burst_Location = (Target point of ability being cast)
      • Set Aqua_Burst_Ability_Level = (Level of (Ability being cast) for Aqua_Burst_Caster)
      • -------- ------------------------------------------------------------------------------------------------- --------
      • -------- Setting the Spell values --------
      • -------- ------------------------------------------------------------------------------------------------- --------
      • Set Aqua_Burst_Area_of_Effect = 175.00
      • Set Aqua_Burst_Base_Damage = 70.00
      • Set Aqua_Burst_Total_Damage = (Aqua_Burst_Base_Damage x (Real(Aqua_Burst_Ability_Level)))
      • Set Aqua_Burst_Damage_Group = (Units within Aqua_Burst_Area_of_Effect of Aqua_Burst_Location matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Owner of (Matching unit)) is an enemy of (Owner of Aqua_Burst_Caster)) Equal to T
      • -------- ------------------------------------------------------------------------------------------------- --------
      • Unit Group - Pick every unit in Aqua_Burst_Damage_Group and do (Actions)
        • Loop - Actions
          • -------- ------------------------------------------------------------------------------------------------- --------
          • -------- Damaging the units from unit group and creating nice special effects --------
          • -------- ------------------------------------------------------------------------------------------------- --------
          • Unit - Cause Aqua_Burst_Caster to damage (Picked unit), dealing Aqua_Burst_Total_Damage damage of attack type Spells and damage type Unknown
          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Other\CrushingWave\CrushingWaveDamage.mdl
          • Special Effect - Destroy (Last created special effect)
          • -------- ------------------------------------------------------------------------------------------------- --------
      • -------- ------------------------------------------------------------------------------------------------- --------
      • -------- Moving the unit --------
      • -------- ------------------------------------------------------------------------------------------------- --------
      • Unit - Move Aqua_Burst_Caster instantly to Aqua_Burst_Location
      • -------- ------------------------------------------------------------------------------------------------- --------
      • -------- Playing a nice unit animation --------
      • -------- ------------------------------------------------------------------------------------------------- --------
      • Animation - Play Aqua_Burst_Caster's birth animation
      • -------- ------------------------------------------------------------------------------------------------- --------
      • -------- Creating nice special effect --------
      • -------- ------------------------------------------------------------------------------------------------- --------
      • Special Effect - Create a special effect attached to the origin of Aqua_Burst_Caster using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
      • Special Effect - Destroy (Last created special effect)
      • -------- ------------------------------------------------------------------------------------------------- --------
      • -------- Clearing Leaks --------
      • -------- ------------------------------------------------------------------------------------------------- --------
      • Custom script: call RemoveLocation(udg_Aqua_Burst_Location)
      • Custom script: call DestroyGroup(udg_Aqua_Burst_Damage_Group)
I think there is a problem when I move a unit, you see if i put 0.27 wait before I move a unit spell goes in cooldown.

But the problem of the wait is that it ruins the MUI thing.

Thanks!

~Berz
 
Level 22
Joined
Nov 14, 2008
Messages
3,256
Testing ...

edit:it's the move unit instantly action, that's causing this

easy to fix just add these lines berzerk! :)

  • Unit - Pause (Triggering unit)
  • Unit - Move (Triggering unit) instantly to targetpoint
  • Unit - Unpause (Triggering unit)
cooldown works for me after that, hope it does for you too

edit2: you dont really need to set the caster into a vaiable when it's an instant spell ;)

regards

~baassee
 
Level 8
Joined
Mar 12, 2008
Messages
437
Continuing DSG's suggestion.

It's this, right?

  • Custom script: call SetUnitX(udg_Aqua_Burst_Caster, GetLocationX(udg_Aqua_Burst_Location))
  • Custom script: call SetUnitY(udg_Aqua_Burst_Caster, GetLocationY(udg_Aqua_Burst_Location))
 
Level 25
Joined
Jun 5, 2008
Messages
2,573
Well i think it's even better to:
  • Custom script: local real x
  • Custom script: local real y
  • Set Aqua_Burst_Location = (Target point of ability being cast)
  • Custom script: set x = GetLocationX(udg_Aqua_Burst_Location)
  • Custom script: set y = GetLocationY(udg_Aqua_Burst_Location)
  • Custom script: call SetUnitX(x)
  • Custom script: call SetUnitY(y)
  • Custom script: call RemoveLocation(udg_Aqua_Burst_Location
But i am a newbie when it comes to Jass so i may be wrong :p
 
Status
Not open for further replies.
Top