Advanced Casualty Cap and Failing / Adding Tasks

Kill your comrades. Wholesale
Post Reply
User avatar
Ferrard Carson
Posts: 565
Joined: Sun Aug 12, 2012 6:08 am

Advanced Casualty Cap and Failing / Adding Tasks

Post by Ferrard Carson »

I have a grand vision (not really grand, but it's a vision, and may or may not be drug-induced). I'm in the process of developing a series of TvT's, and I want to encourage the idea of a combat-ineffective platoon retreating and licking its wounds rather than losing all its units. Part of it is that I'm hoping to incorporate a degree of persistence into this campaign-ish thing (keep an asset, and it may help you in some way in the next mission or the one after that), and part of it is that I like the idea of a weaker force breaking contact instead of charging gloriously into a fusillade of death.

I know that I can use the Advanced Casualty Cap in order to cause another script to execute once, say, the Takistani militiamen are at 30% effectiveness. My question is this: How do I cause the Advanced Casualty Cap to cancel the objective and create a new objective (withdraw across an arbitrarily determined line) that would trigger a "Enemy won, but we saved some of our guys" ending for the defeated force and a "We won, but we weren't able to kill them all" ending for the victors.

Or should I not pursue this line of inquiry due to a party preference for orders of a "Not One Step Back!" variety?

~ Ferrard
"Take a boat in the air you don't love, she'll shake you off just as sure as the turnin' of the worlds. Love keeps her in the air when she oughta fall down, tells you she's hurtin' before she keels... makes her home."

Black Mamba
Posts: 335
Joined: Sun May 27, 2012 12:11 pm

Re: Advanced Casualty Cap and Failing / Adding Tasks

Post by Black Mamba »

It depends what you mean by "objective". If you used tasks,then yeah, you can run code to set the previous task as failed and create a new one.

Turns out I'm currently exploring the same line of idea to actually prevent people from suicide attacking in one of my adversarials. The idea I'm onto at the moment is to run some code that will make a decision regarding who won, based on a hidden calculated score (not the actual arma score which is kinda clunky and doesn't take into account custom events).

Basically the two teams would be given basic guidelines about what can be done and what's best to achieve. Then when the mission ends, a script analyzes what happened and gives a winner, depending on how many people were killed on each side, how many escaped, how many were detained...

Oh yeah, I forgot:
You can use setTaskState to set a task as failed, and the use createSimpleTask again to have the tasked changed.

Post Reply