HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

moved this here since noone in ai is answering

02-04-2004, 02:25 PM#1
shadow)ps(
im making a survival map where the people have to run, not stand and fight. i set the computer units to maximum sight range already, but after a few player units die, the computers units just stand around doing nothing. i want the computers units to constantly follow and attack ANY surviving player units. right now i have attack orders given when the computer units spawn and a

periodic event 20 seconds

pick every unit in playable map owned by computer

order picked unit attack move to position of random unit of random player in player group Tanks(variable for p1-p11)

but the computer units still just stand around. anyone know how to make them more aggressive?
02-04-2004, 02:30 PM#2
Shark
well, if the players have to run to a certain point, make computers attack move to that region, or make them patrol....
i'd personally add all surviving units to SurvivorsGroup and then order the comps to attack a random unit from survirorsgroup...
02-04-2004, 02:32 PM#3
shadow)ps(
thtas what its doing now, but after a player is destroyed the units stop and do nothing unless a player unit attacks them, even then they dont always attack back.
02-04-2004, 02:38 PM#4
Shark
no, u're using player groups, and then attack random units owned by random players in player group....
i'm saying "attack random unit in Survivors group" where survivorgroup is a group made of all "running" units....
sometimes it can work, and little things like those can make a difference :)
02-04-2004, 02:51 PM#5
shadow)ps(
the problem is, the players have only 1 unit not including heros, so when they die, they're removed from player group tanks. therefore they wont even be considered in attacking in random unit of random player in group tanks, because the person that died already is not in the player group
02-05-2004, 10:59 AM#6
shadow)ps(
bump
02-09-2004, 10:12 AM#7
Moss
You still need help with this? I'm not sure I understand, but what happens when that unit in the Tanks group dies? Does it respawn? Why can't you just insert the unit back in the Tanks group in that case? Does it not respawn? Obviously you would have to attack units outside of the tanks group then.
02-09-2004, 02:18 PM#8
shadow)ps(
the unit dies, and is removed from player group tanks and put in player group dead. the player then can be reivived, and when they are, they are removed from dead and put back in tanks, so only living players that have units that are alive are even considered for attacking
02-10-2004, 07:25 AM#9
Moss
So while that tank unit is dead the computer isn't attacking their heros? Just make another trigger or modify the one you got to have them attack other units while the tank unit is dead. Or do I still not understand?
02-10-2004, 01:01 PM#10
SlitVirus
Have any of you played Unknown Creature Tag? Well, I'd suggest using a trigger like that one.
Like this

Unit Group-Pick every unit in (units owned by player '#'(computer) of type 'unit type') and do (unit-(order (picked unit) to attack (Random from (unit type (your tank characters)

That should work.

Oh, yeah, you should also make sure you have that happen every 20-30 seconds or so.
02-10-2004, 02:20 PM#11
shadow)ps(
been there done that, its not what i want, it causes mass lag because of the sheer number of units i have on my map. btw, if anyone uses that, make sure you destroy the group before each time that trig fires, or else youll have a lot of unit groups that dont go away that causes lag eventually.........making it periodic also adds to the lag. and once the random unit is killed, the killers stop moving, in my case anyway.
02-10-2004, 02:35 PM#12
ObsidianTitan
Ive got another approach for you, set the acquisition range as high as you can. this will make the computer always attack the nearest target no matter where they are.
02-11-2004, 02:24 PM#13
shadow)ps(
oooo that sounds good, ill try that, thanks!
02-14-2004, 01:58 PM#14
shadow)ps(
Attack
Events
Unit - A unit enters Center Spawn 1 <gen>
Unit - A unit enters Center Spawn 2 <gen>
Unit - A unit enters Center Spawn 3 <gen>
Unit - A unit enters Center Spawn 4 <gen>
Unit - A unit enters Main Spawn <gen>
Unit - A unit enters Spawn 1 <gen>
Unit - A unit enters Spawn 2 <gen>
Unit - A unit enters Spawn 3 <gen>
Unit - A unit enters Spawn 4 <gen>
Conditions
(Owner of (Triggering unit)) Equal to Player 12 (Brown)
Actions
Unit Group - Order (Units in Center Spawn 1 <gen> owned by Player 12 (Brown)) to Attack-Move To (Position of (Random unit from (Units owned by (Random player from Tanks))))
Unit Group - Order (Units in Center Spawn 2 <gen> owned by Player 12 (Brown)) to Attack-Move To (Position of (Random unit from (Units owned by (Random player from Tanks))))
Unit Group - Order (Units in Center Spawn 3 <gen> owned by Player 12 (Brown)) to Attack-Move To (Position of (Random unit from (Units owned by (Random player from Tanks))))
Unit Group - Order (Units in Center Spawn 4 <gen> owned by Player 12 (Brown)) to Attack-Move To (Position of (Random unit from (Units owned by (Random player from Tanks))))
Unit Group - Order (Units in Main Spawn <gen> owned by Player 12 (Brown)) to Attack-Move To (Position of (Random unit from (Units owned by (Random player from Tanks))))
Unit Group - Order (Units in Spawn 1 <gen> owned by Player 12 (Brown)) to Attack-Move To (Position of (Random unit from (Units owned by (Random player from Tanks))))
Unit Group - Order (Units in Spawn 2 <gen> owned by Player 12 (Brown)) to Attack-Move To (Position of (Random unit from (Units owned by (Random player from Tanks))))
Unit Group - Order (Units in Spawn 3 <gen> owned by Player 12 (Brown)) to Attack-Move To (Position of (Random unit from (Units owned by (Random player from Tanks))))
Unit Group - Order (Units in Spawn 4 <gen> owned by Player 12 (Brown)) to Attack-Move To (Position of (Random unit from (Units owned by (Random player from Tanks))))
AI - Ignore the guard positions of all Player 12 (Brown) units





could this order cause a memory leak? the regions are the spawn areas of the computer, and are very small