Move-to Problems

AnthraxXx

New Member
Reaction score
25
Im doing this trigger so that when someone stands on the switch for said time a unit is created and is told to move to a region, when he arrives at said region, all units excluding entering unit will explode, and all doodads within region will die. The unit is then ordered to move to a region which upon entering he will be removed from the game. I wanted the move-to actions to happen in one continuous flow, so he looks likes he's just flying to a destination, while flying over it it "bombs" it, but is still in flight, moving to end destination.

My problem is the unit gets created, flies halfway to the bombing site, but stops and turns around and goes back to work he was created - it is frustrating! What have I done wrong?

It might be a noob question but I am really stuck here.

Code:
Events
    Unit - A unit enters airstrikeswitch <gen>
Actions
    Game - Display to (All players) for 5.00 seconds the text: ((Name of (Owner of (Triggering unit))) +  has started relaying an airstrike message! 20 Seconds until airstrike!)
    Wait 20.00 seconds
    If ((airstrikeswitch <gen> contains (Triggering unit)) Equal to True) then do (Unit - Create 1 MIG-31 for Neutral Hostile at (Center of bottomrightshoptele <gen>) facing 135.00 degrees) else do (Skip remaining actions)
    Animation - Change (Last created unit) flying height to 800.00 at 0.00
    Game - Display to (All players) the text: Air Strike initiate...
    Unit - Order (Last created unit) to Move To (Center of topleftshoptele <gen>)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    Destructible - Pick every destructible in (Playable map area) and do (Destructible - Kill (Picked destructible))
    Unit - Explode (Random unit from (Units in alloftower <gen>))
    Unit - Explode (Random unit from (Units in alloftower <gen>))
    Unit - Explode (Random unit from (Units in alloftower <gen>))
    Unit - Explode (Random unit from (Units in alloftower <gen>))
    Unit - Explode (Random unit from (Units in alloftower <gen>))
    Unit - Explode (Random unit from (Units in alloftower <gen>))
    Unit - Explode (Random unit from (Units in alloftower <gen>))
    Unit - Explode (Random unit from (Units in alloftower <gen>))
    Unit - Explode (Random unit from (Units in alloftower <gen>))
    Unit - Explode (Random unit from (Units in alloftower <gen>))
    Wait until ((topleftshoptele <gen> contains (Last created unit)) Equal to True), checking every 1.00 seconds
    Destructible - Create a (Destructible-type of (Picked destructible)) at (Random point in alloftower <gen>) facing (Random angle) with scale 1.00 and variation 0
    Unit - Remove (Last created unit) from the game
    Game - Display to (All players) the text: Airstrike Successful
    Trigger - Turn on restock period <gen>
    Wait 0.20 seconds
    Trigger - Turn off (This trigger)
 

AnthraxXx

New Member
Reaction score
25
Ill fix it up and see if it works, but I for some reason doubt it, I will post back if it doesn't work.
 

DoubleDraGoN

New Member
Reaction score
2
So the initial text appears to all players id guess. What else happens?
Change triggering unit to entering unit and wait to wait (game-time seconds)

A bug to your trigger already is the unit can enter/leave 19 seconds/then come back and it will read him as still in region.

Test it by changing wait time to 2 seconds, not 20 you can change it back once it works dude.

Try simplifying it, take out all the animations cept 1 and build from it
 

AnthraxXx

New Member
Reaction score
25
I've simplified it a bit now, the 20 second wait thing is so that the unit MUST stay in the region for the trigger to proceed. It is "programming" the switch. After 20 seconds it checks to see if the unit is still in the region so it can continue the trigger, if not it skips the remaining actions so the trigger can be reset if the unit or another unit comes back into the region.

My simplified version is as follows:
Code:
Events
    Unit - A unit enters airstrikeswitch <gen>
Actions
    Game - Display to (All players) for 5.00 seconds the text: ((Name of (Owner of (Triggering unit))) +  has started relaying an airstrike message! 30 Seconds until airstrike!)
    Wait 20.00 seconds
    If ((airstrikeswitch <gen> contains (Triggering unit)) Equal to True) then do (Unit - Create 1 MIG-31 for Neutral Hostile at (Center of bottomrightshoptele <gen>) facing 135.00 degrees) else do (Skip remaining actions)
    Animation - Change (Last created unit) flying height to 800.00 at 0.00
    Game - Display to (All players) the text: Air Strike initiate...
    Unit - Order (Last created unit) to Move To (Center of topleftshoptele <gen>)
    For each (Integer A) from 1 to 10, do (Actions)
        Loop - Actions
            If ((alloftower <gen> contains (Last created unit)) Equal to True) then do (Special Effect - Create a special effect at (Random point in alloftower <gen>) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl) else do (Do nothing)
    Destructible - Pick every destructible in (Playable map area) and do (Destructible - Kill (Picked destructible))
    For each (Integer A) from 1 to 9, do (Actions)
        Loop - Actions
            Unit - Explode (Random unit from (Units in alloftower <gen>))
    Wait until ((topleftshoptele <gen> contains (Last created unit)) Equal to True), checking every 1.00 seconds
    Destructible - Create a (Destructible-type of (Picked destructible)) at (Random point in alloftower <gen>) facing (Random angle) with scale 1.00 and variation 0
    Unit - Remove (Last created unit) from the game
    Game - Display to (All players) the text: Airstrike Successful
    Trigger - Turn on restock period <gen>
    Wait 0.20 seconds
    Trigger - Turn off (This trigger)
 

DoubleDraGoN

New Member
Reaction score
2
"It still doesn't work, instead ALL destructibles on the back die not just the ones in said region, and the unit still goes halfway then turns back to where it was created. "
"Destructible - Pick every destructible in (Playable map area) and do (Destructible - Kill (Picked destructible))" is the reason
 

AnthraxXx

New Member
Reaction score
25
Ok thanks, yeah I figured that out but it wouldn't let me edit because I needed my account to be activated Lol.

Um ok I changed that, it STILL doesn't work. I'll upload a replay to show you what exactly is wrong:
 

Attachments

  • WEfrustration.w3g
    3.3 KB · Views: 103

DoubleDraGoN

New Member
Reaction score
2
Only thing I can think of is he might be entering another region on the way over thats used in another trigger to tell him to go back. Might want to wait for someone with more exp in the forums:D
 
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