Taunt is crashing my map!

Kike

Member
Reaction score
3
Hi everybody! I was trying to make a Taunt spell making the units around the caster ordered to attack the caster for a duration( the enemy can't stop attacking by ordering another action). I'm not so skilled at triggering so I searched for a similar spell in the web and found this one:

http://www.thehelper.net/threads/taunt-most-useless-ability-in-wc3-history.38628/
(the post made by the guy named Sim)

I
tryed to copy that but now my wc3 crashes everytime I cast it near an enemy! (if I cast with no enemy nearby it doesn't crash).

"My" triggers:

Taunt
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Taunt (Hero)
Actions
Set Taunt_Caster = (Triggering unit)
Set Taunt_Point = (Position of Taunt_Caster)
Trigger - Turn on Taunt Stun <gen>
Set Taunted_People = (Units within 450.00 of Taunt_Point matching ((((Matching unit) belongs to an enemy of (Owner of Taunt_Caster)) Equal to True) and (((Matching unit) is Magic Immune) Equal to False)))
Wait (1.00 + (0.75 x (Real((Level of Taunt (Hero) for Taunt_Caster))))) seconds
Trigger - Turn off Taunt Stun <gen>
Custom script: call DestroyGroup(udg_Taunted_People)
Custom script: call RemoveLocation(udg_Taunt_Point)

Taunt Stun
Events
Unit - A unit Is issued an order targeting an object
Unit - A unit Is issued an order targeting a point
Unit - A unit Is issued an order with no target
Conditions
((Triggering unit) is in Taunted_People) Equal to True
Actions
Unit - Order (Triggering unit) to Attack Taunt_Caster

I will be glad for your help.
 

vypur85

Hibernate
Reaction score
803
In the second trigger, add 'Trigger - Turn off (This trigger)' at the beginning of the action and 'Trigger - Turn on (This trigger)' after your order action.
 

Kike

Member
Reaction score
3
I really don't understand why you turn it off and on and it keep working but... it's fine now! :D Thanks!
 

vypur85

Hibernate
Reaction score
803
The reason is because there was infinite loop. Your action "Order unit to..." will fire the event "A unit is issued order...". This in turns triggers the order action again. And then fires the event again... and so on. And then the engine crashes.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top