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