Page 1 of 1
all i want is one objective!!!!!
Posted: Wed Jun 11, 2003 5:43 am
by williewisp

i'm doing this level at the mo, it's single player, going grand.
i have3 stuka plane set up so u can blow them up(workin grand), how would i set them as 1 objective so that every time 1 was blowin up it would take it off a counter, say like "destroy the planes, 3 remaining", "destroy the planes, 2 remaining" and so on. and how would i get the compass to point to the close'st 1?????????? anyone got any ideas?
also how do i set it so that i can only see a certain amount of the level cus at the mo, i done a big open area to try this out, wit a few things stuck in it, it wants to show me all.??????????

Posted: Wed Jun 11, 2003 7:30 am
by mohaa_rox
//code up here
waitthread global/objectives.scr::add_objectives 1 2 "Destroy the planes [3 remaining]." $firstplane.origin
thread bombfirst
end
bombfirst:
//bombing code
iprintlnbold_noloc "First Plane Destroyed."
wait 1
waitthread global/objectives.scr::add_objectives 1 2 "Destroy the planes [2 remaining]." $secondplane.origin
thread bombsecond
end
bombsecond:
//bombing code
iprintlnbold_noloc "Second Plane Destroyed."
wait 1
waitthread global/objectives.scr::add_objectives 1 2 "Destroy the planes [1 remaining]." $thirdplane.origin
thread bombthird
end
bombthird:
//bombing code
iprintlnbold_noloc "Third Plane Destroyed."
wait 1
waitthread global/objectives.scr::add_objectives 1 3 "Destroy the planes [0 remaining]." $thirdplane.origin //place a check over obj
end
Posted: Wed Jun 11, 2003 8:06 pm
by nuggets
will only work if they're blown up in that order though, best to add a counter
level.wisp_counter = 3
then instead of using
waitthread global/objectives.scr::add_objectives 1 2 "Destroy the planes [2 remaining]."
use
level.wisp_counter = level.wisp_counter - 1
waitthread global/objectives.scr::add_objectives 1 2 "Destroy the planes [" level.wisp_counter " remaining]."
that'll do the trick

Posted: Thu Jun 12, 2003 2:40 am
by Alcoholic
or you could do this...
whenever a plane was destroyed, it would take away one, until it goes to 0...
//code blah blah
//somewhere before the threads are started, type this line...
level.planesleft = 3
waitthread global/objectives.scr::add_objectives 1 2 "Kill stukas. [3 remaining]"
//blah blah
$stuka1 thread obj_stuka_death
$stuka2 thread obj_stuka_death
$stuka3 thread obj_stuka_death
thread stuka_obj
end
obj_stuka_death:
self waittill death //the one that called the thread will wait till it dies...
iprintlnbold_noloc "Stuka Destroyed...HAHAHA"
level.planesleft--
end
stuka_obj:
if (level.planesleft == 2)
{
waitthread global/objectives.scr::add_objectives 1 2 "Kill stukas. [2 remaining]"
}
if (level.planesleft == 1)
{
waitthread global/objectives.scr::add_objectives 1 2 "Kill stukas. [1 remaining! Dont screw it up!!!!!]"
}
if (level.planesleft == 0)
{
waitthread global/objectives.scr::add_objectives 1 3 "Kill stukas. - Completed"
}
end
Posted: Thu Jun 19, 2003 4:55 am
by williewisp
cheers for that men, twas buggin me that thing

Posted: Thu Jun 19, 2003 7:00 am
by mohaa_rox
nuggets wrote:will only work if they're blown up in that order though, best to add a counter
yup, simple, but not realistic.

Posted: Thu Jun 19, 2003 11:16 pm
by nuggets
but simplistic is better than realistic only if realism isn't an issue

wahoo new post buttons, when the hell did they get here?
good work SURGEON!!!