Cause I'm trying to use it to modify a setting of a creature, but when i use to console to get it's DamageThreshold i get values that don't make sense.
When i spawn the creature it has 0 DT, i cast an effect on the creature, which executes and should modify it's DT. While it does, it does not give me the right values.
Here is the relevant part of the code:
float TurretDTfloat Debug1begin ScriptEffectStart Set TurretDT to aaaTEControlQ.BaseDTAssault + aaaTETurretLevelingQ.LevelAssault/2 Set Debug1 to GetAV DamageThreshold PrintC "Step 1 DT: DT = %.2f - TurretDT = %.2f" Debug1 TurretDT if GetAV DamageThreshold != TurretDT Set TurretDT to (aaaTEControlQ.BaseDTAssault + aaaTETurretLevelingQ.LevelAssault/2) -GetAV DamageThreshold PrintC "Step 2 DT: TurretDT = %.2f" TurretDT endif ModAV DamageThreshold TurretDTend
Basicly it should add 1 DT for every 2 levels the creature gets.
What happens is this. I spawn the creature, it is level 1 and it sets it's DT to 4. But that's what's odd. It should been 2, though i could understand 3 even, but 4?
The PrintC is reporting something differently. It Gives me "Step 1 DT: DT = 0.00 - TurretDT = 2.50", so the ModAV should set DT to 3, no?
(TurretDT = 2 + 1/2) This sets TurretDT to 2,5 since it's a float value, (and its what PrintC is reporting as well) then if it modifies the default DT of 0 of the turret, how can it end up as 4?
Then when the turret increases it's level and gets level 2, another strange things happens. It sets it's DT from 4 to 2.
Long story, but i was wondering if i was doing something wrong, or if DT behaves differently then what i expect?
Edit - These values I'm Getting:
Level 1:
PrintC: DT = 0.00 - TurretDT = 2.50
GetAV DamageThreshold: 4
Level 2:
PrintC: DT = 4.00 - TurretDT = 3.00
GetAV DamageThreshold: 2
Level 3:
PrintC: DT = 2.00 - TurretDT = 3.50
GetAV DamageThreshold: 4
Level 4:
PrintC: DT = 4.00 - TurretDT = 4.00
GetAV DamageThreshold: 12
Level 5:
PrintC: DT = 12.00 - TurretDT = 4.50
GetAV DamageThreshold: -2
Level 5:
PrintC: DT = -2.00 - TurretDT = 5.00
GetAV DamageThreshold: 12