Page 1 of 1

Mission Objective not showing, Compass not pointing

Posted: Sat May 03, 2003 12:24 pm
by Otto
I've tried scripting the 'get the documents' mission. But am having problems:

1. The player can pick up the documents, objective completed comes on screen, and when you press the TAB key it showns a X in the box 'get the documents'. But

2. No Mission Objectives are shown when you press the TAB key at the start of the mission, and the compass isn't pointing to the documents location.

Any ideas? thanks in anticipation..

regards

Otto

Posted: Sat May 03, 2003 12:26 pm
by nuggets
is this SP or OBJ?

Posted: Sat May 03, 2003 1:57 pm
by Otto
Singleplayer.

Otto

Posted: Sat May 03, 2003 2:28 pm
by jv_map
Could you post the exact script you're using?

Posted: Sat May 03, 2003 2:38 pm
by mohaa_rox
If i'm not wrong, it should be something like:

set_obj_pos $xxx.origin

below ur waitthread objectives thingy.

Posted: Sat May 03, 2003 3:40 pm
by Otto
//this is the exact script -copied and pasted, thanks. Otto

exec global/ai.scr
exec global/loadout.scr maps/test_sam.scr

level waittill prespawn
exec global/ambient.scr test_sam
level waittill spawn

main:

waitthread Initplayer
waitthread Initobjectives

end

Initplayer:

$player item weapons/m1_garand.tik
$player ammo rifle 24
$player useweaponclass rifle
fadein 2 0 0 0 1
wait 2

level.script = "maps/test_sam.scr"

end

InitObjectives:

waitthread global/objectives.scr::add_objectives 1 1 "Get the documents" $documents.origin


waitthread global/objectives.scr::add_objectives 1 2
waitthread global/objectives.scr::current_objectives 1

end

objective1:
$documents remove
goto objective

end

objective:
waitthread global/objectives.scr::add_objectives 1 3 "Get the documents" $documents.origin
waitthread global/objectives.scr::current_objectives 0
end

Posted: Sat May 03, 2003 8:32 pm
by Otto
:oops: :oops: :oops: Thanks everone. I've spotted the problem :oops: I missed out a couple of CAPITAL letters!! InitPlayer InitObjective. And I must have read through the script fifty times before I spotted it!! :roll: Works perfectly now.

Thanks again

Otto

Posted: Sat May 03, 2003 8:46 pm
by jv_map
Yeah this is one of the few cases mohaa is case sensitive. Hard to spot but fortunately the console error output tells you what's wrong :wink:.

Glad it's working now.