Jump to content
Sign in to follow this  
Kendo J

Now seeking... this script, casualty reports.

Recommended Posts

I wrote a script years ago for OFP. it gave casualty reports from the mission, usually an open ended/dynamic stlye mission. i had eventhandlers and a delete script in there and even had it so that all spawned troops got counted on their deaths so the death counts could be massive.

This is what i wrote over at OFPEC in 2008.

HOWEVER, the download link doesnt work... any one have this or know how to recreate it using my description?

There was a guy on the BI forums asking about how to count over all casualties in a mission and have them reported during game play, was already working on this at the time so I thought I would post it here...

The scripts readme....

Welcome to my collection of event handlers and scripts that allow you to count all the dead units during a mission. On this map are two ways of counting the dead units, one is directly writing the code in thier INIT line, second is from spawning troops for bigger missions. I have also included a delete script so that dead units are cleaned up to reduce lag.

it is possible to do this with a large trigger that adds the counter to all units in it's list... but i couldn't be bothered to do this. E.G. a large trigger with activation: west_units = thisList and in the INIT.sqs, {_x AddEventHandler [{killed}, {west_casualties = west_casualties + 1}]} forEach west_units

I added the action menu casualty report to you (player unit) so you can quickly see how it works, this script can be called anyway you like through radio or add the action to a friendly unit in your base.

the script works like this

INIT.sqs, sets all the casualty counters to 0, and sets all spawning the casualty limits to what ever you want.

Each unit has an eventhandler that adds +1 to the over all casualty count each time a unit is killed

[] exec "CASSITREP.sqs" adds the in-mission casualty numbers to the stringtable format.

----------

the delete script is in there just to show how you can manage lag in large missions.

In a current mission I have added the killed eventhandler to the player that will call a copy of the CASSITREP.sqs script that uses a HINTC instead of hint when you die. That way just before your body hits the ground and the death screen appears you can see all the casualties of the game.

the script also includes armour, vehicle and air casualty counters i.e. you kill a bmp with 3 crew the casualty report will be

Russian Casualties: 3

Russian Armour: 1

Enjoy

Kendo

* CASU_REPORTS.intro.zip (4.78 KB - downloaded 201 times.)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×