Hi Cowlike
I see the Light!!!
About the bug with TakeDamage Event -> CauseDamage Action -> Fort and the use of FlackCannon, remember? destroy a tank in 2 hits? OK. There are two problems:
- Lower and firsts hits don't transfer to fort (for example with enforcer 20 damage per hit)
- The event transfers too much damage to fort (can destroy a tank in 2 hits)
I see that thing: in the event, the property DamageThreshold hold the damage and only activate Out when the holded damage is higher than that value (first problem) AND the event holds all the damage it receive, then if you set MaxTriggerCount to 0 the event will be activate many times with higher values every time. Then it happens that:
You take the enforcer and shoot: 20 damage per hit. But the damage transfered to fort is this: 0, 0, 0, 0, 100, 120, 140, 160..... and so on.
If you set DamageThreshold to 1 then we can solve the first bug. Then the damage transfered is this: 20, 40, 60, 80, 100, 120, 140, 160.... Ths is why the flack cannon cause superdamage to forts. For my example, a fort with 800 health can be destroyed with 9 enforcer hits.
Solution? The screenshot
You can solve this via kismet: in that way the event take the damage and ALWAYS activathe the next action (DamageThreshold=1, MaxTriggerCount=0). Now we need the Event don't hold the damage and reset every time to 0: Mission impossible, but you can fake this: you need 3 Floats: the first is the DamageTaken, second is the LastDamageTaken, and third the substract.
Now in my example it happens that:
Hit 1: 20 - 0 = 20, hold 20.
Hit 2: 40 - 20 = 20, hold 40.
Hit 3: 60 - 40 = 20, hold 60.
Hit 4: 80 - 60 = 20, hold 80.
and so on...
Then the damage transfered to fort is the correct: 20, 20, 20, 20, 20..... and now I need 40 hits to cause 800 damage
And to finish, at LevelReset you must reset that error prevention: SetFloat LastDamageTaken=0 and done!!
Do you like that??
It looks some complicated, but it works!
I really love maths
Bye