HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Wanting AI units to move - help

02-26-2006, 09:40 PM#1
GordonBBB
Okay so I want all the babies to move and attack, but only one does. How do I make them all move and attack?

Trigger:
First Wave
Collapse Events
Time - Elapsed game time is 7.00 seconds
Conditions
Collapse Actions
Unit - Create 10 baby for Player 10 (Light Blue) at (Center of Kiddie Spawner <gen>) facing Default building facing degrees
Wait 1.00 seconds
Unit Group - Pick every unit in (Units in Kiddie Spawner <gen>) and do (Unit - Order (Last created unit) to Attack-Move To (Center of Gate <gen>))
02-26-2006, 09:45 PM#2
shadow1500
You need to use Last Created Unit Group instead of Last Created Unit.
02-26-2006, 09:51 PM#3
GordonBBB
Quote:
Originally Posted by shadow1500
You need to use Last Created Unit Group instead of Last Created Unit.

"Last Created Unit Group" isnt an option...
02-26-2006, 09:53 PM#4
GordonBBB
This however was an option in a different window:
Trigger:
First Wave
Collapse Events
Time - Elapsed game time is 7.00 seconds
Conditions
Collapse Actions
Unit - Create 10 baby for Player 10 (Light Blue) at (Center of Kiddie Spawner <gen>) facing Default building facing degrees
Wait 1.00 seconds
Unit Group - Pick every unit in (Units in Kiddie Spawner <gen>) and do (Unit Group - Order (Units in Kiddie Spawner <gen>) to Attack-Move To (Center of Gate <gen>))
02-26-2006, 09:54 PM#5
Anitarf
Quote:
"Last Created Unit Group" isnt an option...

Not in "issue order to unit", but there's also a "issue order to unit group" action. But you don't need that, you just need to use "picked unit" instead of "last created unit" in your existing trigger.

Edit: oh, you found the group action. There's no need to use it in a pick-every-unit-loop, though, just use it once and that's enough. Note that it only works for the first 12 units in the group, if you have more, you might want to keep the pick-every-unit-loop and order each picked unit to move individually, as I already suggested.
02-26-2006, 10:09 PM#6
Ice_Keese
Hum...
Try using "Picked Units" instead of "Last Created Unit".
02-27-2006, 01:40 AM#7
GordonBBB
Thanks, guys. Ill try that.
02-27-2006, 11:51 AM#8
RaptorTeak
Yes.... If you pick units, it's for use them, mh ? So, like said Ice_Keese, why not using "Picked Unit" instead of "Last Created Unit" ??
02-28-2006, 12:21 AM#9
Seraph
Create Units 1
Events
Time - Every 45.00 seconds of game time
Conditions
Actions
Unit - Create 3 Footman for Player 1 (Red) at (Center of SPAWN1 ) facing 0.00 degrees
Unit - Create 2 Rifleman for Player 1 (Red) at (Center of SPAWN1 ) facing 0.00 degrees

Move1
Events Unit - A unit enters SPAWN1
Conditions
Actions
Unit - Order (Entering unit) to Move To (Center of SPAWN2 )

Move2
Events
Unit - A unit enters SPAWN2
Conditions
Actions
Unit - Order (Entering unit) to Move To (Center of SPAWN3 )

Move3
Events
Unit - A unit enters SPAWN3
Conditions
Actions
Unit - Order (Entering unit) to Move To (Center of SPAWN3 )

(thanks to http://world-editor-tutorials.thehel...f.php#tdmark10)