ai spawning

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
fuhrer
Captain
Posts: 253
Joined: Sun Mar 14, 2004 3:36 am

ai spawning

Post 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.
fuhrer
Captain
Posts: 253
Joined: Sun Mar 14, 2004 3:36 am

Post 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
Wierdo
Corporal
Posts: 47
Joined: Wed Jan 09, 2008 11:15 pm
Location: Winfield, KS

Post 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.
Imagination
Sergeant
Posts: 56
Joined: Thu May 04, 2006 7:35 am

Post by Imagination »

Booooo move to scripting, us simple mapping folk can't solve this!
:shock:
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

Your right topic moved .
Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post 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.
Image
Post Reply