Home   Help Search Login Register  

Author Topic: Multiple Endings  (Read 1417 times)

0 Members and 1 Guest are viewing this topic.

Offline snafu

  • Members
  • *
Multiple Endings
« on: 28 May 2011, 14:50:33 »
Hi

I'm trying to make my basic patrol mission a bit more exciting by having multiple endings like the old OFP mission Ambush.

The mission involves a patrol moving from one end of a forest to the other engaging a random number of enemy troops randomly positioned along the way. This randomness means that each time the mission is played 3 things happen.

1. The squad takes no or light casualties.

2. The squad takes a few or major casualties.

3. The squad gets wiped out with only the player surviving.

I would like to have  a total of 3 endings for these 3 different scenarios.

At the moment the patrol objective gets activated when the squad exits the forests and activates a trigger grouped to it that also executes a script with some radio chatter, 'well done, mission completed etc.'

For 1. I would like the standard ending as described above.

For 2. I would like the standard ending but with slightly different radio chatter, 'mission completed but you took too much casualties etc.'

For 3. I would get have the player contact HQ that he's the only one left and HQ would tell him to proceed to a certain location like the OFP Ambush mission.

I'm not sure how to set this up exactly. Would I have two triggers for 2 and 3 so they're checking the status of the squad constantly with this in the condition field:

Code: [Select]
2. this && (({alive _x} count units group player) < 8)

3. this && (({alive _x} count units group player) < 1)

And then the relevant scripts and tsk setTaskState "SUCCEEDED" in the activation field of the triggers?

Any help appreciated.
« Last Edit: 28 May 2011, 19:17:47 by snafu »

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: Multiple Endings
« Reply #1 on: 28 May 2011, 19:52:48 »
Sure, different triggers should be quite good enough (alternatively a simple script, or a procession of gamelogics with waypoints). Also consider changing the flavour text in your briefing.html and making each ending a different END# so that players can see the effects in the debriefing as well.

I suggest you make the "leaving the forest" trigger a general one that just turns a global variable like "EndChat = true" true, and then add the extra triggers:

For 1:

Condition: EndChat && {alive _x} count units group player >= 8
On Activation: <good work chat>

For 2:

Condition: EndChat && {alive _x} count units group player <= 7
On Activation: <good work but your team is dead chat>

For 3:

Condition: EndChat && {alive _x} count units group player == 1
On Activation: <you screwed up!>

That should do it. As for the different endings, I'm not sure what you mean...it's the end of the mission: shouldn't they all be evacuated from the same spot, no matter if there's one or 10 people surviving? What I suggest you do, though, is make the final trigger a "Switch" trigger, and synch it to the regular end waypoint trigger that leads to the 1 & 2 ending spot. Then add another WP after the regular last waypoint, which would normally not be seen, but thanks to the synched switch wp, it'll switch to it instead of the regular one. If you catch my drift? Alternatively, just add a new task with a new task WP, since that's the way to do it in Arma 2 ;)

Hope you caught my meaning here either way. Good luck!

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline snafu

  • Members
  • *
Re: Multiple Endings
« Reply #2 on: 28 May 2011, 22:10:06 »
Thanks for the help Wolfrug!. Will try out ASAP.  :good: