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)
New mapper needs help!
Moderator: Moderators
-
UBER_SOLDAT
- Warrant Officer
- Posts: 127
- Joined: Wed Aug 07, 2002 7:44 pm
- Location: ENGLAND
- Contact:
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.
'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.
-
UBER_SOLDAT
- Warrant Officer
- Posts: 127
- Joined: Wed Aug 07, 2002 7:44 pm
- Location: ENGLAND
- Contact:
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
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