Page 1 of 1
AI respawning?
Posted: Sun Sep 10, 2006 7:55 am
by t_mann05
So i can make AI, but after i kill them, how do i get them to respawn? Is it a script?
Posted: Sun Sep 10, 2006 10:18 am
by a mammoth
Yes you must script it.
Posted: Wed Sep 13, 2006 10:51 am
by shade45
Yes it must be scripted, i dont know the exact script you would use becouse i havnt messed with AI yet(plan on it soon

) but try looking at some of the sp scripts to see how they respawn the AI
Posted: Sun Sep 17, 2006 8:39 am
by t_mann05
alright thanks if you guys find out how to do it let me know!
Posted: Sun Sep 17, 2006 4:21 pm
by Spammy
Well, in the AI thread somewhere around page 30, there is a script. I think it was
Code: Select all
(script startup respawner
(sleep_until (<= (ai_living_count 331) 0))
(ai_place 0000)
I tried it but couldn't get it spawn anything other than the second ai squad chunk...wierd.
Also, you could change startup to static(?) to make it respawn more than once.
Posted: Sun Sep 17, 2006 4:40 pm
by WastingBody
Thats not right but it wouldnt work anyway because the ai_place wont spawn the ai from my experience.
Posted: Sun Sep 17, 2006 5:08 pm
by Spammy
Code: Select all
(script startup respawner
(sleep_until (<= (ai_living_count 311) 0))
(ai_place 0000)
)
That's the script. It does work...sort of. It will spawn whatever squad is under the second chunk(labelled chunk 1) of the squads reflexive(if you've set it to spawn any number on easy/legendary and you have them placed inside the BSP of the MP map).
So, my problem is that I cannot get it to respawn the first(chunk 0) squad.
And it will only compile if you put the squad to respawn's name and the triggering squad's(ai_living_count 311) to a number; it won't compile if you give it an actual name...
Posted: Tue Sep 19, 2006 1:57 pm
by leorimolo
I made that script
Code: Select all
(script startup respawner
(sleep_until (<= (ai_living_count 331) 0))
(ai_place 311)
Rename your AI to 311, for example where it says johonson rename to 311
Posted: Tue Sep 19, 2006 4:41 pm
by t_mann05
so that will make the respawn? can u take a screenshot of where you enter that script at and rename the character to 311?