Home   Help Search Login Register  

Author Topic: variable in briefing/debriefing...  (Read 1759 times)

0 Members and 1 Guest are viewing this topic.

Offline fleepee

  • Members
  • *
  • Enter the Matrix!
variable in briefing/debriefing...
« on: 09 Mar 2009, 11:41:54 »
I'm making an MP mission in wich one of the objectives is to destroy ammo crates...
I wish I could put a variable in briefing/debriefing indicating the number (or percentage) of crates destroyed...
Does anybody knows if it'spossible and the syntax for it?  ???
Thanks!

Offline hoz

  • OFPEC Site
  • Administrator
  • *****
Re: variable in briefing/debriefing...
« Reply #1 on: 09 Mar 2009, 16:27:20 »
Its not possible as far as I know...unless you build your own briefing /debriefing dialog.
Xbox Rocks

Offline Ironman

  • Former Staff
  • ****
    • {GSF} Home Page
Re: variable in briefing/debriefing...
« Reply #2 on: 09 Mar 2009, 18:14:57 »
No variable can be defined in the Briefing but what you are asking is a pretty simple task to do if you create a trigger that contains all the creates you are using.

1) group a trigger with a ammo box
2) in the trigger condition field put:
numCrates = 0; { numCrates = numCrates + ({ alive _x } count) } forEach thisList; (numCrates <= *insert number of crates destroyed*) and (time > 5)
3) Activation field put what ever you want:
"3" objStatus "DONE";

Hopefully it works because this is the kind of trigger I use to determine if to many civilians have died then mission ends.
TS3 IP: tor.zebgames.com:9992

Walter_E_Kurtz

  • Guest
Re: variable in briefing/debriefing...
« Reply #3 on: 10 Mar 2009, 02:21:17 »
How many ammo crates are you talking about? If it's relatively few, you could use objStatus to hide / reveal pre-written lines.

(NB. I'm writing this as though it were for OFP - I hope it works the same for ArmA)

1. Edit the briefing.html
Code: [Select]
<p><a name="OBJ_10"></a>
Destroy as many ammo crates as possible.
</p><hr>
<p><a name="OBJ_11"></a>
Destroy as many ammo crates as possible. 10% destroyed.
</p><hr>
<p><a name="OBJ_12"></a>
Destroy as many ammo crates as possible. 20% destroyed.
</p><hr>
... etc.

2. In init.sqs put all the crates in an array and hide the unnecessary objectives:
Code: [Select]
CrateList = [crate1, crate2, ... etc. ]
"11" objStatus "HIDDEN"
"12" objStatus "HIDDEN"
... etc.

3. Create an equal amount of triggers (triggered Once) to crates, and name them: oneCrate, twoCrates, etc. For oneCrate:
condition: ({!alive _x} count CrateList == 1)
Activation: "10" objStatus "Hidden"; "11" objStatus "Active"; deleteVehicle oneCrate

then for twoCrates,
condition: ({!alive _x} count CrateList == 2)
Activation: "10" objStatus "Hidden"; "11" objStatus "Hidden"; "12" objStatus "Active"; deleteVehicle twoCrates

and so on.


Obvious, stage 3 could be replaced by a script if you prefer.

Offline fleepee

  • Members
  • *
  • Enter the Matrix!
Re: variable in briefing/debriefing...
« Reply #4 on: 10 Mar 2009, 17:11:07 »
Thanks everybody!
That's good ideas!  :good:
(and I only have 10 crates...)