Mission Objective not showing, Compass not pointing

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Otto
Lance Corporal
Posts: 16
Joined: Sat Apr 19, 2003 8:15 pm

Mission Objective not showing, Compass not pointing

Post 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
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

is this SP or OBJ?
hope this helps, prob not cos it's all foreign 2 me :-/
Otto
Lance Corporal
Posts: 16
Joined: Sat Apr 19, 2003 8:15 pm

Post by Otto »

Singleplayer.

Otto
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Could you post the exact script you're using?
Image
User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Post by mohaa_rox »

If i'm not wrong, it should be something like:

set_obj_pos $xxx.origin

below ur waitthread objectives thingy.
Live to map, not map to live.
-mohaa_rox, .map
moderator
Otto
Lance Corporal
Posts: 16
Joined: Sat Apr 19, 2003 8:15 pm

Post 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
Otto
Lance Corporal
Posts: 16
Joined: Sat Apr 19, 2003 8:15 pm

Post 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
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post 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.
Image
Post Reply