OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: pazuzu on 22 Jun 2004, 05:06:57
-
Hi, I'm making a mission that is supposed to be a covert mission with many objectives & I wanted to hide the objective & markers for them.
The idea is to make obj & marker appear only when previous obj is done.
How do I do this? (I've searched for this topic but without success)
Thank you
-
In the init.sqs use the command
"objectivenumber" objstatus "hidden"
and where you're turning the previous objective to done, use
"objectivenumber" objstatus "active"
For markers you can set their size to 0,0 in editor and then when you're turning a previous objective to true, use
"markername" setmarkersize [1,1]
-
Basic example :
;the init file starts automatically at the beginning of the mission
; this hides the second objective and the marker
"2" ObjStatus "HIDDEN"
"Nameothemarker" SetMarkerType "Empty"
; tells the game that we are finished with this file now
exit
To "reveal" markers you can use commands such as setMarkerType and setMarkerColor ;).
-
Ok, I tried using those commands to make objectives hidden & then active & they work fine but now my problem is to have all objectives hidden in map screen before the game is started. They are all visible before I start game but if I put "hidden" command in west present trigger at beginning they will all disappear. I want them to be invisible until objectives are met.
How would I go about making objectives hidden even before game starts?
Do I have to type something in the brief?
Thanks
-
No no no.. no. You'll need to make a script named as init.sqs and have your hide commands in there. init.sqs loads up before even the briefing does, so you'll have the objectives hidden by the time you'll see the briefing.
-
Read snYpir's tutorial "How to use Objectives and init.sqs". You can get a template init.sqs from the Tutorial Mission. Both in the Ed Depot.