Elf Alpha
New Member
- Reaction score
- 0
I've (finally!) got this working mostly correctly. It generates a bunch of units for Player 12 (a neutral hostile computer player), tells 'em to board a ship, and then they get dropped off somewhere and go a-raiding, just to make the map a little bit more interesting. I've designated 5 areas as "Coasts" which it will randomly select from, but the thing is, once it picks one, it always sends the second (and third, etc.) groups to that same randomly selected coast. Is there a way to make it pick a different one each time? Here's what I gots:
P.S. - I know this also causes a massive memory leak, I'm sure (even makes the whole game freeze up for a second or two when the trigger kicks in). Anyone could tell me how to plug it? You'll officially be super-awesome. : )
P.P.S. - "Seadog", "Buccaneer" and so forth are custom units I've designed for this map.
Trigger:
- Events
- Time - Every (Random real number between 360.00 and 540.00) seconds of game time
- Conditions
- (Shipyard <gen> is alive) Equal to True
- (Barracks <gen> is alive) Equal to True
- Actions
- Unit - Create 1 Seadog for Player 12 (Brown) at (Position of Pirate Barracks 0090 <gen>) facing Default building facing degrees
- Unit Group - Add (Last created unit) to Raiders
- Unit - Order (Last created unit) to Board Transport[(Number of units in (Units owned by Player 12 (Brown) of type Human Transport Ship))]
- Wait 2.00 seconds
- Unit - Create 1 Seadog for Player 12 (Brown) at (Position of Pirate Barracks 0090 <gen>) facing Default building facing degrees
- Unit Group - Add (Last created unit) to Raiders
- Unit - Order (Last created unit) to Board Transport[(Number of units in (Units owned by Player 12 (Brown) of type Human Transport Ship))]
- Wait 2.00 seconds
- Unit - Create 1 Buccaneer for Player 12 (Brown) at (Position of Pirate Barracks 0090 <gen>) facing Default building facing degrees
- Unit Group - Add (Last created unit) to Raiders
- Unit - Order (Last created unit) to Board Transport[(Number of units in (Units owned by Player 12 (Brown) of type Human Transport Ship))]
- Wait 2.00 seconds
- Unit - Create 1 Buccaneer for Player 12 (Brown) at (Position of Pirate Barracks 0090 <gen>) facing Default building facing degrees
- Unit Group - Add (Last created unit) to Raiders
- Unit - Order (Last created unit) to Board Transport[(Number of units in (Units owned by Player 12 (Brown) of type Human Transport Ship))]
- Wait 2.00 seconds
- Unit - Create 1 Buccaneer for Player 12 (Brown) at (Position of Pirate Barracks 0090 <gen>) facing Default building facing degrees
- Unit Group - Add (Last created unit) to Raiders
- Unit - Order (Last created unit) to Board Transport[(Number of units in (Units owned by Player 12 (Brown) of type Human Transport Ship))]
- Wait 27.00 seconds
- Unit - Order Transport[(Number of units in (Units owned by Player 12 (Brown) of type Human Transport Ship))] to Move To (Center of Coasts[(Random integer number between 1 and 5)])
- Unit - Order Transport[(Number of units in (Units owned by Player 12 (Brown) of type Human Transport Ship))] to Unload All At (Random point in Coasts[(Random integer number between 1 and 5)])
- Unit Group - Pick every unit in Raiders and do (Unit - Add Wander (Neutral) to (Random unit from Raiders))
- Wait 60.00 seconds
- Unit - Order Transport[(Number of units in (Units owned by Player 12 (Brown) of type Human Transport Ship))] to Move To (Random point in Region 004 <gen>)
P.S. - I know this also causes a massive memory leak, I'm sure (even makes the whole game freeze up for a second or two when the trigger kicks in). Anyone could tell me how to plug it? You'll officially be super-awesome. : )
P.P.S. - "Seadog", "Buccaneer" and so forth are custom units I've designed for this map.