![]() |
OnActorDead - Damage DS
SO ehre i am back to scripting after giving up to focus on studying.
im tryign to create a scrip who counts for point when a palne gets killed (for now). to start: Quote:
I really dony understand, how Damagerscore list works, so where i am requesting your aid. for now, my problems are: AI is not counted as destoyed, if i crash my plane is ok, but if an AI shoots me down it dobles the score ( im guessing its becosue im not specifin initiator or reciever of the damage. I based myself on the code From "Mid-july1940_v10" mission, who looks like: Quote:
so ... help? please? :grin: |
Bump here. Can anyone explain damages score please?
Code removed by author |
Add all Values in the damagerlist together, then you have the 100%. Then divide
part damagerscore / 100% Value = Percent |
Quote:
Code removed by author |
No nothing wrong, after this you have the 100% Value.
Example 4 damagersscores (12, 1, 16, 5) 12 + 1 + 16 + 5 = 34 to get the percentual part of a single damager 12/34 = 0,353 (35,3%) 1/34 = 0,029 (2,9%) 16/34 = 0,471 (47,1%) 5/34 = 0,147 (14,7%) controll: 0,353 + 0,029 + 0,471 + 0,147 = 1 So Damager 1 has made 35,3% of the damage, Damager 3 has done the most with 47,1%. |
Agh! Got it now :) So does the raw sum total damages give any indication of relative "strength" between actors then. ie.
Actor 1 dies .... total damages = 10 Actor 2 dies .... total dmaages = 100 Actor1 is 1/10 as strong as actor 2? |
no it's depend on the damager hits
from Battle Script / strategy.dll AddScoreToInitiator(AiActor actor, AiDamageInitiator initiator, double score): Code:
|
OK. Thanks, Got the points allocation to work now. Much appreciated.
|
All times are GMT. The time now is 10:00 AM. |
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.