View Full Version : attack random units
oddballx1
04-25-2005, 8:56 PM
Hi I have a question on making some computer controlled units attack a random player's unit until it is dead. Some problems I have had are, Computer units becoming confused and moving wierd ways to attack the player, randomly switching attack targets (The best I can do to make it work), attacks but when unit goes too far they go back to original positions(not patrol), and some others. Im trying to basically make it so a group of units randomly select random units of different players to attack BUT they have to stay on that target until they die or the player's unit dies. In addition i want it to apply every time a group of computer units appear.
example of the best i can make:
Condition
Always
Result
center location labeled group on civilian owned by human players at anywhere
Condition
wave 1 is set
Result
order all zealots owned by computer at anywhere to attack to group
preserve trigger
This doesnt work too well since it changes targets.
Terazel
04-29-2005, 4:55 PM
Is the human player controling all units in the group, or 1 unit per human Player?
You had one mistake in your triggers, and that's using the 'attack' order.
'Attack' only applies to buildings, because they - unlike unit - are grid based.
You can't attack spacific units with triggers, since the only way to cause one unit to attack another is using the patrol comand.
You can, on the other hand, make three different players instead of two - one who's attacking, one who's being attacked, and one who's really getting attacked.
Make both 'being attacked' players the same color (in editors like StarForge or SCMDraft) and make one of the being attacked computers allied with the attacker (while make the other enemy).
Than, just place units for the players who're allied, and when you want a unit to be attacked give one unit owned by the allied foe to the enemy foe and the computer will start attacking that unit.
Since they're the same color - it won't be noticed that they're from different players!
Spdstr
05-01-2005, 10:45 PM
... Or you could use the simple AI Script in a non-standard Map Editor called... DRUM ROLL!!!
"Send All Units on Random Suicide Missions".
;)
Member,
~ Spdstr
LegacyWeapon
05-04-2005, 8:04 PM
Condition
Always
Result
center location labeled group on civilian owned by human players at anywhere
Condition
wave 1 is set
Result
order all zealots owned by computer at anywhere to attack to group
preserve trigger
This doesnt work too well since it changes targets.Are you preserving the center location?
Are you using hyper triggers?
Attack order works when the unit reaches the specified location or if the unit is attacked.
MidnightGladius
05-04-2005, 9:36 PM
Make all units invincible and then un-invincibilize the targets. Repeat as often as needed.
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.