For message broadcast (eg: "player A has taken lead!!") each widget could be modified to communicate with opposite team's widget to sync its value/correct-deviation... (much like how allyCursor widget communicate with each other). This ensure the value are same across player...
You can count enemy unit death with metal wreckage. New wreck = new unit death, so filter wreck with 'allyID' to yield enemy unit death.
Interesting: so there is information in the wrecks about what player it belonged to?
This could still be interesting to my statistics widget. It is an widget so it doesnt have information on enemy deaths, but as you become spectator it fills up that information. Maybe using this widget could be more reliable that asking spring for a start value of a players deaths and kills (when you become spec or reload luaui).
Or even better, since the killcount isnt the best measure of efficiency, I'm trying to replace it with a killed-hp count, the maximum healt points of the units you have killed. Maybe this could come in handy there. killed-hp isnt a perfect measure either, but it's better than just kills or dealt damage imo.
what happens on entering jammer, entering water, being transported, morphing?
If jammed then spring will call UnitLeftLOS or -Radar, depending on where is was visible. Not sure about the others. When morphed the unit essentially dies and gets replaced by the morphed unit (new unitID).
it gives you attackerID...
But is the attackerID the enemy or one of the chain exploded bombs?
It seems we need to have a discussion about what is a kill, I didn't think there would be several views about it. Obviously, I don't think those things you mentioned are really kills.
If a tank is, say 1% complete, it's not really a tank yet, and it has no personnel, so if someone bombs it, how can that be counted as a kill? It also has no ability to defend itself (dunno if that's something we should consider).
If a planned construction is cancelled, then that's not a kill. There is no-one killing it. Same thing if something is reclaimed, then it 's reclaimed, not killed.
To me a kill happens when a unit gets destroyed in combat, be it either a military or a civilian one (although spring doesnt distiguish). But this debate is also higly philosophic, basically we need to decide when a unit is a unit. Maybe we can borrow some arguments from the abortion debate:)
Last edited by Jools on 06 Sep 2011, 20:25, edited 1 time in total.
Anyway, killed units is not the best measure of a player's success. I've started to use "killed hp" instead in my other widget, which means weighting the number of kills by the hp the unit has as 100% full health.
It's not perfect, but I think it's better than just "kills" or "damage dealt".
That's a nice idea, will be interesting so see how you lay it out graphically. Still, one life is also 1 life so kills is still a good way to count it. Or, whatever way you do it it's not gonna be perfect, because it's not better to kill 20 pyros than 1 goliath, for instance.
I updated a little my gadget: - Not counting spectator as players anymore - Printing faction name as well - Printing "AI" instead of "" for external AI. But reading the proper AI shortName would require a gadget<->widget communication, making the whole thing a bit more complex than just a gadget.
Edit: Thanks to [BoS]nixtux for telling me about a bug that made it crash when playing against AI.
File comment: Tis a gadget, not a widget. taken_the_lead.lua [2.63 KiB]
Downloaded 106 times
Users browsing this forum: No registered users and 1 guest
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum