• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

[Trigger] Getting units to cast spells in a mul instances

Status
Not open for further replies.
Level 6
Joined
Aug 31, 2014
Messages
137
Hello im working on a map like Survival choas but ive ran into an issue that i forsaw a long time ago and never quite figured out how to fix the issue. The issue is that i get units to cast their spells but the units sometimes freeze and do nothing and will not cast an ability when ordered not even attack. I have mulituble triggers for different areas of the map thinking maybe it was the using one veriable, or so on put the casters into groups ect i know im doing something the wrong way and maybe thats it.[trigger=gui]
  • Necomaster coin right
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Undead vs Orcs <gen> contains (Attacking unit)) Equal to True
      • (Unit-type of (Attacking unit)) Equal to Necomancer
    • Actions
      • Set Necomaster_right = (Attacking unit)
      • Set Necomaster_Right = (Position of Necomaster_right)
      • Set Necomastergroup_right = (Units within 700.00 of (Position of Necomaster_right) matching ((((Matching unit) belongs to an ally of (Owner of Necomaster_right)) Equal to True) and ((Percentage life of (Matching unit)) Less than or equal to 80.00)))
      • Set coiltargetright = (Random unit from Necomastergroup_right)
      • Unit - Order Necomaster_right to Undead Death Knight - Death Coil coiltargetright
      • Unit Group - Remove all units from Necomastergroup_right
      • Set Necomaster_right = No unit
      • Set Necomaster_right = No unit
      • Custom script: call DestroyGroup (udg_Necomastergroup_right)
      • Custom script: call RemoveLocation (udg_Necomaster_Right)
.

even weirder yet i have A trigger that is turned off and still making units use their abilitys....

Thank you for taking your time and reading this and maybe help me out :)
 
Level 11
Joined
Jun 2, 2004
Messages
849
Do you have any channel based abilities that use the death coil order string?

There's a bug with channel where it can screw up order strings such that triggers and the AI will no longer be able to use abilities that use them. It's solved by making the original ability (like in this case, the death knight's normal Death Coil ability) be loaded before the channel one. Or of course, not using order strings in channel that are used elsewhere.
 
Level 6
Joined
Aug 31, 2014
Messages
137
its based off the ability its self its just when more then one is around each other they like to sometimes to stop and and wait for the unit they i wanted them to heal to die before they do anything else.[edit] I seem to been able to make a small adjustment to make a bandaid fix till i find a more effective way to do the trigger it self[trigger=gui]
  • Necomaster coin righ
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Undead vs Orcs <gen> contains (Attacking unit)) Equal to True
      • ((Attacked unit) belongs to an ally of Player 6 (Orange)) Equal to True
    • Actions
      • Set Necomaster_right = (Random unit from necoattacktop)
      • Set Necomaster_Right = (Position of (Attacked unit))
      • Set Necomastergroup_right = (Units within 700.00 of (Position of Necomaster_right) matching ((((Matching unit) belongs to an ally of (Owner of Necomaster_right)) Equal to True) and ((Percentage life of (Matching unit)) Less than or equal to 80.00)))
      • Set coiltargetright = (Random unit from Necomastergroup_right)
      • Unit - Order (Random unit from (Random 1 units from necoattacktop)) to Undead Death Knight - Death Coil coiltargetright
      • Unit Group - Remove all units from Necomastergroup_right
      • Set Necomaster_right = No unit
      • Set coiltargetright = No unit
      • Custom script: call DestroyGroup (udg_Necomastergroup_right)
      • Custom script: call RemoveLocation (udg_Necomaster_Right)
and yes the veriables are messy :)
 
Last edited:
Level 10
Joined
Sep 16, 2016
Messages
269
It might be because the trigger runs continuously. The casting unit need time to turn and cast the spell. While these happens, many other events occurs thus freezes this unit. I suggest you try to put a turn off trigger and wait a few second to turn on again, or using an auto-cast ability like healing hand.
 
Level 6
Joined
Aug 31, 2014
Messages
137
It might be because the trigger runs continuously. The casting unit need time to turn and cast the spell. While these happens, many other events occurs thus freezes this unit. I suggest you try to put a turn off trigger and wait a few second to turn on again, or using an auto-cast ability like healing hand.
I had been able to fix this with a diffent trigger line up. and grouping units in a group. Thank you for giving the input :)
 
Status
Not open for further replies.
Top