Page 1 of 1

Spawn & Respawn.....Heeeeeelp !!!!!!!

Posted: Wed Aug 07, 2002 1:52 pm
by tjshark
:lol: Hi ,who know how respawn the ai, the only respawn tutorial in the mohaa websites is for mg42.....someone can help me?

Posted: Wed Aug 07, 2002 4:28 pm
by Kentaro-K.21
You'll be able to spawn or respawn the german ai.
I'll post a example.

This example assumes to has an german ai in a map.
The german ai (named "john") will respawn whenever he'll be defeated.

A map will contain the following entity.
----------
{
"targetname" "john"
"testanim" "idle"
"model" "human/german_elite_sentry.tik"
"scale" "1.0"
"classname" "ai_german_elite_sentry"
}
----------

A corresponding script of the map is like following.
----------

exec global/ai.scr

main:

level waittill prespawn

exec global/friendly.scr

level waittill spawn

level.john_his_respawn_place = $john.origin

thread john_the_avenger

end

john_the_avenger:

while (isAlive $john) wait 1

$john remove

waitframe

spawn human/german_elite_sentry.tik "targetname" "john"

$john.origin = level.john_his_respawn_place

wait 1

goto john_the_avenger

----------

Posted: Thu Aug 15, 2002 9:04 am
by tjshark
wow, is perfect!!! thank you for this tip.... :D