OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Xsi9mm on 17 Feb 2007, 00:04:27

Title: How to make an objective? Ive never been able to make one
Post by: Xsi9mm on 17 Feb 2007, 00:04:27
Please someone make an example mission on the steps on making a an objective and different kind of objectives. please respond as soon as possible, thanks!
Title: Re: How to make an objective? Ive never been able to make one
Post by: Mandoble on 17 Feb 2007, 00:34:49
Inside your briefing file:

<hr>
<p><a name = "OBJ_1"></a>Go straight South and discover enemy troops.</p>
<hr>
<hr>
<p><a name = "OBJ_2"></a>Destroy enemies.</p>
<hr>

As an example.

Then, to check an objetive as done
Code: [Select]
"1" objStatus "DONE"
To check an objetive as failded
Code: [Select]
"1" objStatus "FAILED"
You may execute objStatus inside activation fields of triggers or scripts.
Title: Re: How to make an objective? Ive never been able to make one
Post by: Xsi9mm on 17 Feb 2007, 00:46:12
uh how does it know what my objective is the briefing is just text how do i designate my objective?
Title: Re: How to make an objective? Ive never been able to make one
Post by: hoz on 17 Feb 2007, 02:06:15
OBJ_1 = "1"
OBJ_2 = "2"
etc.

Code: [Select]
<p><a name = "OBJ_1"></a>Go straight South and discover enemy troops.</p>
the OBJ_1 is the first objective the text following it is the text.

Title: Re: How to make an objective? Ive never been able to make one
Post by: h- on 17 Feb 2007, 11:36:11
Aaand, just to confuse:

The objective in the briefing html code does not have to be OBJ_1..

Sometimes when you are building a large or a complex mission (with multiple hidden objectives etc.) it can be easier to name the objectives with a more descriptive name, so you can use for example
Code: [Select]
<p><a name = "OBJ_HeadSouthAndReconForNME"></a>Go straight South and discover enemy troops.</p>And then you would tick that objective done with
Code: [Select]
"HeadSouthAndReconForNME" objStatus "done"
Quote
how does it know what my objective is the briefing is just text
I have no clue if this is even close, but:
The game has instructions to 'read' the html file and weed out certain things flagged with some special tag, in this case the tag is OBJ_
Whenever the html reading thingy (yes, very professionally put  :P ) finds such a tag it will then read what is written after OBJ_ until it reaches html code again. At that point the game 'memorizes' the text and it can be used with certain commands, in this case objStatus..
Title: Re: How to make an objective? Ive never been able to make one
Post by: Xsi9mm on 17 Feb 2007, 17:32:01
Ah ok thanks!  :D