Page 1 of 1

ai spawning

Posted: Mon Aug 23, 2004 12:25 am
by fuhrer
hey i gone thru all the ai tuts i can get my hands on but not quite found what im lookin for,

ive used the tut from the rjukan project to spawn the dudes, but i want them to keep spawning after the last one dies like the mg42 ai tut here on .map but im not sure how to manipulate them as the project tut uses a trigger to spawn them once and the mg tut uses key / value of $spawn / 2 on the mg itself to keep the respawning.

what id also like to do is have them respawning until an officer is dead.

Posted: Mon Aug 23, 2004 2:26 am
by fuhrer
based on the rjukan project ai spawnin tut i tried this...

Code: Select all

thread spawns


end


spawns:

thread global/ai.scr::spawngroup #1 #1
thread global/ai.scr::spawngroup #1 #2
thread global/ai.scr::spawngroup #1 #3

wait 5
if (!(isAlive $officer_1) && !(isalive $officer_2))
{
end
}

thread spawns
end
no cigar

Posted: Thu Feb 07, 2008 1:17 am
by Wierdo
I believe you need an "else" command in the script. You have to give it a second option. If xxx isAlive checks to see if those two are still alive. if you don't place an "else" in there, it cannot figure out what to do when the situation = false.

This is my best guess.

Posted: Thu Feb 07, 2008 3:32 am
by Imagination
Booooo move to scripting, us simple mapping folk can't solve this!
:shock:

Posted: Thu Feb 07, 2008 9:36 am
by bdbodger
Your right topic moved .

Posted: Fri Feb 08, 2008 9:00 pm
by jv_map
Rather than using spawngroups I would suggest programming it all manually, that is simply spawn the dudes with the

spawn (AI model)

command. Requires some more scripting skill but makes it far easier to implement more complicated spawning patterns for which ai.scr is simply not suitable.