PDA

View Full Version : Losses on Hud



rovan
May-15-2013, 18:14
Hi, I wonder if there is any way to show the the number of enemy and friendly losses on HUD or one txt or.....
besides casualties caused by AI on air, ground, etc.

Thanks!

bolox
May-16-2013, 16:03
Yes there's a way of doing things like that with some scripting.
using HudLog is probably the easiest- maybe something like this:-


public override void OnActorDead(int missionNumber, string shortName, AiActor actor, List<DamagerScore> initiatorList)
{
if (actor is AiAircraft)

{
if (actor.Army() == 1)
{
cEnemy++;
GamePlay.gpHUDLogCenter("RAF down");
}

if (actor.Army() == 2)
{
cFriendly++;
GamePlay.gpHUDLogCenter("Luftwaffe down");
}
}
}


Now there's 'counters' for RAF and Luftwaffe kills (cEnemy and cFriendly- need to be defined earlier in script) and you could display the result of these counters.

Ground events could be done similarly and with some imagination more complicated things can be done.

The above is an edited snippet from Redux campaign's scoring system,

rovan
May-16-2013, 16:04
and I would also like to know how to view detailed statistics on normal missions and campaigns as in QMB missions.


any script?


thanks!!!!!!

rovan
May-16-2013, 16:10
Yes there's a way of doing things like that with some scripting.
using HudLog is probably the easiest- maybe something like this:-
[CODE][ public override void OnActorDead(int missionNumber, string shortName, AiActor actor, List<DamagerScore> initiatorList)
{
if (actor is AiAircraft)

{
if (actor.Army() == 1)
{
cEnemy++;
GamePlay.gpHUDLogCenter("RAF down");
}

if (actor.Army() == 2)
{
cFriendly++;
GamePlay.gpHUDLogCenter("Luftwaffe down");
}
}
}
/CODE]

Now there's 'counters' for RAF and Luftwaffe kills (cEnemy and cFriendly- need to be defined earlier in script) and you could display the result of these counters.

Ground events could be done similarly and with some imagination more complicated things can be done.

The above is an edited snippet from Redux campaign's scoring system,



thanks but i havent enough knowledge of scripting to do it, I studied many years ago but can not remember anything. Could you put a complete example?


Many Thanks.