Non-player units moving back to start when attacked?

ninjaalamode

New Member
Reaction score
0
In my map, I have two teams controlling player 9 and 10's units with arrow keys, and also by using units in the top-left of the map for casting spells with the help of triggers.

My problem lies in when these units damage each other. I only have one ability so far for the units, with triggers incorporated into it, and when this triggered ability goes off, it causes units to move instantly to a certain unit, and then causes that certain unit to use warstomp. The problem is that when the stun wears off on the affected units, they move back to the very first point they spawned into the map at.

I'm thinking it's something to do with how units normally react to being damaged and etc., because I looked through my triggers to make sure there wasn't anything that would cause them to move back to their starting point in the map. So, is there any way to prevent this from happening, any solution to this?

EDIT: Oh, I better add the ability trigger as well, to show what I'm trying to get at...
Trigger:
  • CQC
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to CQC
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Current order of Soldier[(Player number of (Owner of (Casting unit)))]) Equal to (Order(<Empty String>))
        • Then - Actions
          • Unit Group - Pick every unit in (Units within 200.00 of (Position of Soldier[(Player number of (Owner of (Casting unit)))]) matching ((((Matching unit) belongs to an ally of (Owner of (Casting unit))) Equal to False) and ((Matching unit) Not equal to Soldier[(Player number of (Owner of (Cas and do (Actions)
            • Loop - Actions
              • Unit - Move (Picked unit) instantly to (Position of Soldier[(Player number of (Owner of (Casting unit)))])
          • Unit - Order Soldier[(Player number of (Owner of (Casting unit)))] to Orc Tauren Chieftain - War Stomp
        • Else - Actions
          • Unit - Set mana of (Casting unit) to ((Mana of (Casting unit)) + 50.00)

I don't think there's anything wrong with the trigger, or at least I don't think anything in it is causing the problem I am having, it's just that the units move back to their starting position in the map after the stun from warstomp wears off.
 

rotten

New Member
Reaction score
2
I don't think this trigger is the problem.

The other units are enabled to control with arrow keys by other triggers; perhaps when the units are paused (stunned) those triggers are cut off or reach the end of their loop. You probably did this yourself to prevent players from moving stunned units by trigger.

Then the units turn to their normal AI for instructions and it tells them to go back to their spawn locations, like when neutral hostile creep camps return to their spot if you've pulled them out far enough.
 

ninjaalamode

New Member
Reaction score
0
I don't think this trigger is the problem.

The other units are enabled to control with arrow keys by other triggers; perhaps when the units are paused (stunned) those triggers are cut off or reach the end of their loop. You probably did this yourself to prevent players from moving stunned units by trigger.

Then the units turn to their normal AI for instructions and it tells them to go back to their spawn locations, like when neutral hostile creep camps return to their spot if you've pulled them out far enough.

Yeah, I didn't really think the trigger was the cause either. I thought it might be like you said, with the units going back to their starting point being part of AI. I also didn't put any triggers in to cut off players from using arrow keys to move unit while stunned, because the arrow key movement triggers move the units with 'issue order' action, so just being stunned cuts them off from being moved by the player.

So, do you know of any way I might stop the units from reacting to the ability like this?
 

rotten

New Member
Reaction score
2
Forcing a restart of the control triggers when (or rather just after) the units are stunned may work.
 
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