Jump to content
Sign in to follow this  
Wasdie

Scoring script

Recommended Posts

Hey all. I'm doing some work with the Evo Blue MHQ V3 map. I have been updating it to work with the ACE mod as a few features didn't work as well as adding the weapons and vehicles into the new Evo map.

Anyways, I need some help with a scoring script. Is there any way in ArmA to access the number of enemies, armor, and air a player has killed. ACE doesn't score like ArmA does, so im basically writing a little script to score properly. This isn't an ACE thing this is an ArmA thing I need, really I could use this outside of ACE in any mission I want but it would be pointless.

Thanks.

Share this post


Link to post
Share on other sites

I don't think that you can access this detailed info directly, only the sum of all scores with the command 'score'.

But you can record this info during the mission:

Add a killed-Eventhandler to all units (or extend an already existing one). This EH returns the destroyed object and the one who destroyed it.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this addeventhandler["killed", {_this execVM "score.sqf";}];

score.sqf

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">private["_obj", "_killer", "_type"];

_obj = _this select 0;

_killer = _this select 1;

if(_obj iskindof "Man") then {

       // _killer killed a soldier

} else {

       _type = getNumber (configFile >> "CfgVehicles" >> (typeOf _obj) >> "type");

       if(_type == 0) then {

               //_killer killed a soft vehicle

       };

       if(_type == 1) then {

               // _killer killed a tank

       };

       if(_type == 2) then {

               // _killer killed a aircraft

       };

};

Then you have to think of some datastructure where you store and maintain these infos for each player.

Share this post


Link to post
Share on other sites

mando has made a even finer grained function for that.

its part his bomb and missile pack. mando_score.sqf

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  

×