wont go to next objective ??

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
LtNeil
Sergeant
Posts: 54
Joined: Sun Nov 14, 2004 8:46 pm
Location: southend on sea
Contact:

wont go to next objective ??

Post by LtNeil »

In my first obj i have a cannon that fires and a man standing next to it when he gets shot the cannon stops fireing and the player then goes on to objective two but when the player kills the man it still stays on the first obj ??? heres the script

// Objective One

waitthread global/objectives.scr::add_objectives 1 2 "Kill the cannon_operator" $obj1.origin
set_objective_pos $obj1
thread obj1
end

obj1:

if (IsAlive $cannon_operator)
{
$flak88 anim fire_scripted
wait 2
$flak88 anim idle
goto obj1
}
else
{
$cannon_operator waittill death
$flak88 anim idle
}
waitthread global/objectives.scr::add_objectives 1 3 "kill the cannon_operator" $obj1.origin
waitthread global/objectives.scr::current_objectives 0

wait 2
waitthread global/objectives.scr::add_objectives 2 2 "Use the bangalore" $obj2.origin
set_objective_pos $obj2
thread obj2
end
My candle burns at both ends it will not last the night but oh my foes and oh my friends it gives a lovely light.
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post by Green Beret »

Im no pro at scripting so imma give my guess.
after they guy gets killed, Add a objective++
Or sumtin like that.
Image
User avatar
Mj
Map Reviewer
Posts: 1394
Joined: Sun Apr 25, 2004 3:36 pm
Location: England

Post by Mj »

Try removing this line:

$cannon_operator waittill death
hmm or try:

else
{
$cannon_operator waittill death
$flak88 anim idle

waitthread global/objectives.scr::add_objectives 1 3 "kill the cannon_operator" $obj1.origin
waitthread global/objectives.scr::current_objectives 0

wait 2
waitthread global/objectives.scr::add_objectives 2 2 "Use the bangalore" $obj2.origin
set_objective_pos $obj2
thread obj2
end
}
ImageImage
LtNeil
Sergeant
Posts: 54
Joined: Sun Nov 14, 2004 8:46 pm
Location: southend on sea
Contact:

Thank you

Post by LtNeil »

WOOHOO its works thanks a lot m8!,who would have thought that just taking out the $cannon_operator waittill death and then just putting } after $flak88 anim idle would make everything all better,simple!(when you know how,lol)
My candle burns at both ends it will not last the night but oh my foes and oh my friends it gives a lovely light.
User avatar
Mj
Map Reviewer
Posts: 1394
Joined: Sun Apr 25, 2004 3:36 pm
Location: England

Post by Mj »

wow, i helped someone scripting! :o

Dude... i'm a Jedi 8-)
ImageImage
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

I'm a sith! :twisted:
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
LtNeil
Sergeant
Posts: 54
Joined: Sun Nov 14, 2004 8:46 pm
Location: southend on sea
Contact:

Post by LtNeil »

Im just grateful :lol: :lol: :lol:
My candle burns at both ends it will not last the night but oh my foes and oh my friends it gives a lovely light.
Post Reply