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

[Solved] Unit stuck after using spell

Status
Not open for further replies.
Level 2
Joined
Jun 14, 2018
Messages
9
I made some triggers to add global cooldown for an op spell so it can't be spammed but after the paladin cast the spell , he gets stuck by stuck I mean he can't move ,attack or cast any spell.
Can someone help me and tell me what's wrong?

Screenshot_2.png

Screenshot_1.png

Screenshot_3.png

jus5m1
jus5tn
jus5yf
 
Level 2
Joined
Jun 14, 2018
Messages
9
I understand the problem now , I managed to fix it by adding "Wait" action for 1 second before removing the spell and it worked! Thanks for the reply it made me understand the problem.
 
Level 9
Joined
Apr 23, 2011
Messages
527
@Bombriick: Unrelated, but helpful anyway since the issue is solved:

Your unit group leaks. Remove it by using a variable and the custom script:
  • set PalaGroup = (Units of type Paladin)
  • Custom script: call DestroyGroup(udg_PalaGroup)
Also, next time, use [trigger][/trigger] like I did for GUI triggers. (Right click trigger name in Trigger Functions -> Copy as Text)
 
Unrelated optimization:

Better yet, use this script:

  • Custom Script: set bj_wantDestroyGroup = true
  • Unit Group - Pick every unit in (Units of type |cffffff00Paladin|r) and do (Actions)
    • ...
That saves you a DestroyGroup call and a variable.

Related:

Try removing the ability after the unit finishes casting the spell (certainty of 100% success) or on spell effect (Mostly successful) instead of begins casting event.

Also, in training a unit event, try checking if the global timer is running by checking the remaining time. If it is not 0, do not proceed. Otherwise, proceed.
 
Level 2
Joined
Jun 14, 2018
Messages
9
@Light
@MyPad

Thanks for the information , I think using the unit finishes casting spell event will fix it too, but never thought about it before.

Also, next time, use like I did for GUI triggers. (Right click trigger name in Trigger Functions -> Copy as Text)

I will do that in the future , thanks for telling me about it.
 
Status
Not open for further replies.
Top