| 06-23-2003, 06:46 AM | #1 |
I have an array of regions and an array of unit groups set to the units inside the coreesponding region. (If region[1] contains 3 knights, then creeps[1] adds the knights to the unit groups and so on) How would I make it so that when a timer expires, it respawns the unit groups if they're empty. A: For each (Int A) from 1 to 12 (If (Number of units in (units in Region[Int A] Equal to 0)) then do ______) else (do Nothing) So what actions would be used to respawn the unit group in the region? |
| 06-23-2003, 08:13 AM | #2 |
Wouldn't that use Create units facing angle/point? |
| 06-23-2003, 08:32 AM | #3 |
And how could I create a predefined group of units from that command? Because its either really hard or I'm just missing something really obvious. |
| 06-23-2003, 08:55 AM | #4 |
You can't create a unit with properties already set... Since game cache isn't multi player, if that's what you meant? |
| 06-23-2003, 08:56 AM | #5 |
If you suspend corspe decay, you can use the revive command i think? |
| 06-23-2003, 09:19 AM | #6 |
Err..kinda misspoke I suppose. I have X regions and in each region there's a group of units. I want it so that every 3 minutes in the game, if the region is empty, it creates a group of units within it that were there before. The units previously there were assigned to a unit group, so what I want is an action that recreates the unit group that existed there. In more detail, I suppose.. Trigger1: E: Elapsed game time is 2 seconds A: Set Region[1] = FelwoodSpawn1 <gen> A: Set Region[2] = FelwoodSpawn2 <gen> A: Set Region[3] = FelwoodSpawn3 <gen> A: For each (Int A) from 1 to 12 do (Unit Group - Add all units of (Units in region[Int A] to Creeps[IntA] That sets up both the region and unit type variables, so when the timer elapses.. E: Time - TimeSpawn Expires A: For each (Int A) from 1 to 3 (If (Number of units in (units in Region[Int A] Equal to 0)) then do -------------) else (do Nothing) So I want that action (or trigger) to readd the unit group should it be empty. Sorry to iterate and such, but I thought this would be simple and I'm just missing something because its 6am, but meh. |
| 06-23-2003, 07:30 PM | #7 |
*bump* Sorry. Need to know if this is possible, or if there's another easy way. |
