New mapper needs help!

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

Moderator: Moderators

Post Reply
swskier
Corporal
Posts: 27
Joined: Wed Aug 07, 2002 4:09 pm

New mapper needs help!

Post by swskier »

Im working on a SP map where you have to eliminate a group of soldiers, how do i make the objective to kill everyone? thanks!

(this post probably belongs in the scripting forum, sorry)
-swskier
UBER_SOLDAT
Warrant Officer
Posts: 127
Joined: Wed Aug 07, 2002 7:44 pm
Location: ENGLAND
Contact:

Post by UBER_SOLDAT »

You need to have in your script a variable like level.enemy_count, and that when one of the enemies dies, level.enemy_count -- , and then have:

'if (level.enemy_count ==0)
{
waitthread global/objectives.scr::add_objectives etc
}

so if there are no more soldiers left, it will add an objective. There should be a tut for adding objectives somewhere.

make sure you put at the start of your script that level.enemy_count = 20, or however many enemies you've got.
swskier
Corporal
Posts: 27
Joined: Wed Aug 07, 2002 4:09 pm

Post by swskier »

i have no idea what you mean :roll: are there any tutorials i could look at?
thanks!
-swskier
UBER_SOLDAT
Warrant Officer
Posts: 127
Joined: Wed Aug 07, 2002 7:44 pm
Location: ENGLAND
Contact:

Post by UBER_SOLDAT »

heres what you'd write:

main

level waittill prespawn

exec global ai.scr
etc

level waittill spawn

////////////
$enemy thread enemy_death //$enemy is your enemies targetname

enemy_death:

if (isALive self) //if hes alive, it will end
{
end
}

level.enemy_count -- //subtract from counter of enemies alive
/////////////

end

thats all i know about this. look at the nebelwerfer level script for help, that has an objective for destroying a set number of objects [nebelwerfers], so that should help
Post Reply