| 03-07-2005, 03:15 AM | #1 |
Okay I have a problem, I want it so, when a unit is in a region it will spawn that unit every 5 seconds. I was wondering, is there a way to make it so when the unit is in the region the trigger can tell what type of unit it is and spawn that unit? Other wise Im going to have to make 684 triggers, which is bull. 54 for each player x 12 players = 684 triggers. So can anyone help me?!?!?! |
| 03-07-2005, 03:27 AM | #2 |
Not right. Fixing it now, just give me a min. Code:
Untitled Trigger 001
Events
Unit - A unit enters Spawn <gen>
Unit - A unit leaves Spawn <gen>
Conditions
Actions
Wait 5.00 seconds
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Spawn <gen> contains (Triggering unit)) Equal to True
Then - Actions
Set Unit_Type = (Unit-type of (Triggering unit))
Unit - Create 1 Unit_Type for Player 1 (Red) at (Center of Spawn <gen>) facing Default building facing degrees
Else - Actions |
| 03-07-2005, 03:34 AM | #3 |
Sweet it works, but theres still a problem. I want it to create the unit over and over every 5 seconds, but it only creates it once. EDIT: what happened to last post?? Why was it removed? |
| 03-07-2005, 03:44 AM | #4 |
I always seem to be making mistakes. Anyways It's been fixed for the 3rd time :) BTW Turn the spawning trigger off. Code:
Spawning
Events
Time - Every 5.00 seconds of game time
Conditions
Actions
Unit - Create 1 Unit_Type for Player 1 (Red) at (Center of Spawn <gen>) facing Default building facing degreesCode:
Entering
Events
Unit - A unit enters Spawn <gen>
Conditions
Actions
Set Unit_Type = (Unit-type of (Triggering unit))
Trigger - Turn on Spawning <gen>Code:
Leaving
Events
Unit - A unit leaves Spawn <gen>
Conditions
Actions
Trigger - Turn off Spawning <gen> |
| 03-07-2005, 04:24 AM | #5 |
Thx, for you help! I found out my own trigger that works well. |
