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

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
tjshark
Private
Posts: 2
Joined: Fri Aug 02, 2002 5:10 pm

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

Post 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?
Kentaro-K.21
Lance Corporal
Posts: 20
Joined: Wed Jul 17, 2002 3:14 pm
Location: Japan

Post 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

----------
tjshark
Private
Posts: 2
Joined: Fri Aug 02, 2002 5:10 pm

Post by tjshark »

wow, is perfect!!! thank you for this tip.... :D
Post Reply