OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: ACtrigger on 22 Sep 2002, 16:17:42

Title: Objectives
Post by: ACtrigger on 22 Sep 2002, 16:17:42
I have created a mission where you get picked up from a base, then assault another one. I have created the briefing and it works fairly well, but I don't want the 2nd objective to show untill I reach a certain point during the mission. HOW?
Title: Re:Objectives
Post by: macguba on 22 Sep 2002, 16:20:46
Checkout snYpir's tutorial "How to use Objectives and init.sqs" in Getting Started in the Editor's Depot .... I'd answer myself but I can't remember the syntax.    It's all dead easy anyway.

Title: Re:Objectives
Post by: icarus_uk on 22 Sep 2002, 16:31:00
In a units int, or in an init.sqs put;

2 Objstatus "hidden"

This will hide the objective at the start of the mission.

Then use

2 Objstatus "active"

so show it later in the mission.
Title: Re:Objectives
Post by: ACtrigger on 22 Sep 2002, 16:37:04
In a trigger that is true at the start of the mission I have made the objective hidden but it appears in the opening briefing before the mission starts. If you put it in a units init. will it be invisable at the starting briefing?
Title: Re:Objectives
Post by: macguba on 22 Sep 2002, 16:40:28
hmm, dunno.   try it

if you put it in init.sqs it won't appear in the briefing.
Title: Re:Objectives
Post by: ACtrigger on 22 Sep 2002, 16:41:58
I'm not to good at scripting, could you gimmie a link to snYpirs tutorial?
Title: Re:Objectives
Post by: macguba on 22 Sep 2002, 16:47:54
The scripting part is a piece of cake ... and if you get stuck, just ask

Click on Editors Depot at the top of this screen

Once you're in the Ed depot click on "Getting Started" under Tutorials on the left hand side

Its about 2/3 of the way down the list.

There are loads of other good tutorials there too.  
Title: Re:Objectives
Post by: ACtrigger on 22 Sep 2002, 17:50:37


[attachment deleted by admin]
Title: Re:Objectives
Post by: Rodd on 22 Sep 2002, 18:10:38
I think you have gotten a superfluous underscore in there  :-X
Title: Re:Objectives
Post by: icarus_uk on 22 Sep 2002, 19:08:50
Ok answering some questions in a polite manner as told to by my OFPEC parole officer.

The Init.sqs is just like any other script except that it is automatically called before the mission.  You do not need to call in, it does it itself.  Much like the init field of a unit, these changes happen before the mission starts, before the briefing shows.

All you need do to make an init.sqs is make a new text file in your flashpoint mission folder and type whatever commands you want in it.  If you really want, you could take all the init commands youve put into the units and put them in this sqs (though you would need to use names and not "this").

Triggers on the other hand, are not activated until the mission has started.  Infact it takes them a few tenths of a second before they are activated.  Which is why you might see a flash of your character before a trigger activated intro.

So there you have it, init.sqs good, triggers bad.  Init fields are exactly the same (but without a script and not very well organized).
Title: Re:Objectives
Post by: ACtrigger on 01 Oct 2002, 22:43:40
I tried this but the objectives still show at the beggining where you see the mission briefing before the mission starts.

:help:
Title: Re:Objectives
Post by: macguba on 02 Oct 2002, 04:22:14
Just noticed the typo in Icarus' post.    


2 Objstatus "hidden"   <--- wrong


"2" Objstatus "hidden"   <--- right
"2" Objstatus "active"
Title: Re:Objectives
Post by: ACtrigger on 02 Oct 2002, 19:17:00
Cheers, that worked. (not being sarcastic even though it sounds like it)