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

[Spell] Spell wont go in Cooldown

Status
Not open for further replies.
Level 2
Joined
Aug 16, 2015
Messages
9
I have a custom spell based on Storm Bolt that relies on triggers to work
And I dont want to have a stun on it.

Everything works except that it doesnt go to cooldown.
How can I fix it

pVriGpZ.png
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
The name of the ability tells all the story here, you are moving casting unit at ability event trigger.Here is one solution, instead of doing this:


Unit - Move your unit to somePoint

you should do this

Set PointVariable = somePoint
custom script: call SetUnitX(GetTriggerUnit(), udg_PointVariable)
custom script: call SetUnitY(GetTriggerUnit(), udg_PointVariable)
custom script: call RemoveLocation(udg_PointVariable)
 
Level 24
Joined
Aug 1, 2013
Messages
4,658
@Ceday
Almost man, you have to do GetLocationX() and GetLocationY()

@PPSNatsu
You indeed stop the casting of the ability when you move the casting unit.
You have to store the location in a variable and then use

Custom script: call SetUnitX(GetTriggerUnit(), GetLocationX(udg_myLocation))
Custom script: call SetUnitY(GetTriggerUnit(), GetLocationY(udg_myLocation))

You should search for a tutorial about how to remove leaks.
The string "myLocation" should be the name of your variable.
 
Level 24
Joined
Aug 1, 2013
Messages
4,658
Also... your ability will stun the opponent for a very short amount of time.
I call this effect the "Shock" effect. It exists only for one purpose: interrupting something.

You can base your ability of Acid Bomb if you want a missile that doesnt have a stun.
Damage can be set to 0... this is also recommended to do so actually.
 

sentrywiz

S

sentrywiz

Add "Pause & Unpause Triggering Unit" at the start of the spell.

The cooldown not starting is happening because you are moving the unit at the same time it tries to cast the spell.
 
Status
Not open for further replies.
Top