- unit enters region. - if "unit" is owned by player1 & Tower P1 <gen> contains Tower) Not equal to True - then Creat tower @ tower p1 <gen> & kill entering unit.
heres the problem i want to make it that every player can only have 1 tower max. if some1 allrdy has a tower it wont let him get second tower. PLS HELP been tring to get help last 45min.
dude why dont u make it like this events: -map initialization actions: -Player - Limit training of BLA to 1 for Player 1 (Red) (and do this to all players example blue, teal etc.)
creating a tower
Events
Unit - A unit enters entering unit <gen>
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(tower unit <gen> contains tower) Equal to False
(Owner of (Entering unit)) Equal to Player 1 (Red)
Then - Actions
Unit - Kill (Entering unit)
Unit - Create 1 Cannon Tower for Player 1 (Red) at (Center of tower unit <gen>) facing (Position of (Triggering unit))
Set tower = (Last created unit)
Else - Actions
Game - Display to (All players) the text: OMG IT WORKS
2#
creating units at tower
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(tower unit <gen> contains tower) Equal to True
Then - Actions
Unit - Create 1 Footman for Player 1 (Red) at (Center of tower unit <gen>) facing Default building facing degrees
Else - Actions
Do nothing
this is the trigger what i want :d but it doesnt work right. in the 2#CODE it still creats units after tower unit is dead and in 1#CODE after tower is dead i cant make a new tower. :S make some1 can help me with it?
tower Events Unit - A unit enters Region 000 <gen> Conditions Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Region 000 <gen> contains tower) Equal to False (Owner of (Triggering unit)) Equal to Player 1 (Red) Then - Actions Unit - Kill (Triggering unit) <- maybe removing would be better Unit - Create 1 Cannon Tower for Player 1 (Red) at (Center of Region 000 <gen>) facing Default building facing degrees Set tower = (Last created unit) Trigger - Turn on createunits <gen> Else - Actions Do nothing ============================== createunits Events Time - Every 5.00 seconds of game time Conditions Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Region 000 <gen> contains tower) Equal to True Then - Actions Unit - Create 1 Footman for Player 1 (Red) at (Center of Region 000 <gen>) facing Default building facing degrees
Else - Actions Do nothing ====================================== towedie Events Unit - A unit Dies Conditions (Triggering unit) Equal to tower Actions Trigger - Turn off createunits <gen> ==============================================
In your triggers the units keep spawning as long as the remains of the tower are there. In my triggers the spawning stop once the tower dies, and you can create another tower there when the remains of the tower disappear.
and its a easy trigger lol.. :S i feel stupid... aa btw u i need testers soon... any1 wana be a tester? :d
I can test your map.
Also for the tower thing, I optimized the triggers:
tower Events Unit - A unit enters Region 000 <gen> Conditions Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (tower is dead) Equal to True (Owner of (Triggering unit)) Equal to Player 1 (Red) Then - Actions Unit - Kill (Triggering unit) Unit - Create 1 Cannon Tower for Player 1 (Red) at (Center of Region 000 <gen>) facing Default building facing degrees Set tower = (Last created unit) Trigger - Turn on createunits <gen> Else - Actions Do nothing
createunits Events Time - Every 5.00 seconds of game time Conditions Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (tower is alive) Equal to True Then - Actions Unit - Create 1 Footman for Player 1 (Red) at (Center of Region 000 <gen>) facing Default building facing degrees Unit - Order (Last created unit) to Move To (Center of Region 001 <gen>) Else - Actions Trigger - Turn off (This trigger)
================================================== The second trigger should be set as initially off. Now you can create a new tower as soon as the previous dies, and not wait untill the remains disappear. Only two triggers now.
i made 2 triggers for all players... :d it should work for all ppl
Creat Marin Tower
Events
Unit - A unit enters Marin Tower <gen>
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
(TowerP1 is dead) Equal to True
Then - Actions
Unit - Kill (Entering unit)
Unit - Create 1 Marin Tower for Player 1 (Red) at (Center of Marin Tower P1 <gen>) facing Default building facing degrees
Set TowerP1 = (Last created unit)
Else - Actions
Game - Display to Player Group - Player 1 (Red) the text: You all ready have ...
Unit - Move (Triggering unit) instantly to (Center of Master Golems <gen>)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(TowerP2 is dead) Equal to True
(Owner of (Triggering unit)) Equal to Player 2 (Blue)
Then - Actions
Unit - Kill (Entering unit)
Unit - Create 1 Marin Tower for Player 2 (Blue) at (Center of Marin Tower P2 <gen>) facing Default building facing degrees
Set TowerP2 = (Last created unit)
Else - Actions
Game - Display to Player Group - Player 2 (Blue) the text: You all ready have ...
Unit - Move (Triggering unit) instantly to (Center of Master Golems <gen>)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(TowerP3 is dead) Equal to True
(Owner of (Triggering unit)) Equal to Player 3 (Teal)
Then - Actions
Unit - Kill (Entering unit)
Unit - Create 1 Marin Tower for Player 3 (Teal) at (Center of Marin Tower P3 <gen>) facing Default building facing degrees
Set TowerP3 = (Last created unit)
Else - Actions
Game - Display to Player Group - Player 3 (Teal) the text: You all ready have ...
Unit - Move (Triggering unit) instantly to (Center of Master Golems <gen>)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(TowerP4 is dead) Equal to True
(Owner of (Triggering unit)) Equal to Player 4 (Purple)
Then - Actions
Unit - Kill (Entering unit)
Unit - Create 1 Marin Tower for Player 4 (Purple) at (Center of Marin Tower P4 <gen>) facing Default building facing degrees
Set TowerP4 = (Last created unit)
Else - Actions
Game - Display to Player Group - Player 4 (Purple) the text: You all ready have ...
Unit - Move (Triggering unit) instantly to (Center of Master Golems <gen>)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(TowerP5 is dead) Equal to True
(Owner of (Triggering unit)) Equal to Player 5 (Yellow)
Then - Actions
Unit - Kill (Entering unit)
Unit - Create 1 Marin Tower for Player 5 (Yellow) at (Center of Marin Tower P5 <gen>) facing Default building facing degrees
Set TowerP5 = (Last created unit)
Else - Actions
Game - Display to Player Group - Player 5 (Yellow) the text: You all ready have ...
Unit - Move (Triggering unit) instantly to (Center of Master Golems <gen>)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(TowerP6 is dead) Equal to True
(Owner of (Triggering unit)) Equal to Player 6 (Orange)
Then - Actions
Unit - Kill (Entering unit)
Unit - Create 1 Marin Tower for Player 6 (Orange) at (Center of Marin Tower P6 <gen>) facing Default building facing degrees
Set TowerP6 = (Last created unit)
Else - Actions
Game - Display to Player Group - Player 6 (Orange) the text: You all ready have ...
Unit - Move (Triggering unit) instantly to (Center of Master Golems <gen>)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(TowerP7 is dead) Equal to True
(Owner of (Triggering unit)) Equal to Player 7 (Green)
Then - Actions
Unit - Kill (Entering unit)
Unit - Create 1 Marin Tower for Player 7 (Green) at (Center of Marin Tower P7 <gen>) facing Default building facing degrees
Set TowerP7 = (Last created unit)
Else - Actions
Game - Display to Player Group - Player 7 (Green) the text: You all ready have ...
Unit - Move (Triggering unit) instantly to (Center of Master Golems <gen>)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(TowerP8 is dead) Equal to True
(Owner of (Triggering unit)) Equal to Player 8 (Pink)
Then - Actions
Unit - Kill (Entering unit)
Unit - Create 1 Marin Tower for Player 8 (Pink) at (Center of Marin Tower P8 <gen>) facing Default building facing degrees
Set TowerP8 = (Last created unit)
Else - Actions
Game - Display to Player Group - Player 8 (Pink) the text: You all ready have ...
Unit - Move (Triggering unit) instantly to (Center of Master Golems <gen>)
Creat Marin Units
Events
Time - Every 4.00 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(TowerP1 is alive) Equal to True
Then - Actions
Unit - Create 1 Marine Golem for Player 1 (Red) at (Center of Marin Tower P1 <gen>) facing Default building facing degrees
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(TowerP2 is alive) Equal to True
Then - Actions
Unit - Create 1 Marine Golem for Player 2 (Blue) at (Center of Marin Tower P2 <gen>) facing Default building facing degrees
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(TowerP3 is alive) Equal to True
Then - Actions
Unit - Create 1 Marine Golem for Player 3 (Teal) at (Center of Marin Tower P3 <gen>) facing Default building facing degrees
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(TowerP4 is alive) Equal to True
Then - Actions
Unit - Create 1 Marine Golem for Player 4 (Purple) at (Center of Marin Tower P4 <gen>) facing Default building facing degrees
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(TowerP5 is alive) Equal to True
Then - Actions
Unit - Create 1 Marine Golem for Player 5 (Yellow) at (Center of Marin Tower P5 <gen>) facing Default building facing degrees
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(TowerP6 is alive) Equal to True
Then - Actions
Unit - Create 1 Marine Golem for Player 6 (Orange) at (Center of Marin Tower P6 <gen>) facing Default building facing degrees
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(TowerP7 is alive) Equal to True
Then - Actions
Unit - Create 1 Marine Golem for Player 7 (Green) at (Center of Marin Tower P7 <gen>) facing Default building facing degrees
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(TowerP8 is alive) Equal to True
Then - Actions
Unit - Create 1 Marine Golem for Player 8 (Pink) at (Center of Marin Tower P8 <gen>) facing Default building facing degrees
Else - Actions
Do nothing
will this work for all players?:O i think it will :d