Hi. I'm a new scrub to world editor. I was creating a passive to give 0.1 all stats (perma) for every unit killed by 1 of my hero. The trigger itself works but not in decimals. I did some research and found that the world editor always round up or down for stats so I'm not sure how to fix this. I know some maps I've played had a decimal boost to stats. At least, that's how it seemed from the player perspective. An alternative, if someone can do this for me, is make it that every 10 units killed gives 1 to all stats. I'd be fine with that too. Thanks ahead of time!
Adaptability Copy
Events
Unit - A unit Dies
Conditions
Actions
Set VariableSet BobUnit = (Killing unit)
Set VariableSet AdaptKills = (Dying unit)
-------- STR --------
Set VariableSet AdaptCurrent[1] = (Strength of BobUnit (Exclude bonuses))
Set VariableSet AdaptGain[1] = ((Real(AdaptCurrent[1])) + 0.10)
Set VariableSet AdaptFinal[1] = (Integer(AdaptGain[1]))
-------- AGI --------
Set VariableSet AdaptCurrent[2] = (Agility of BobUnit (Exclude bonuses))
Set VariableSet AdaptGain[2] = ((Real(AdaptCurrent[2])) + 0.10)
Set VariableSet AdaptFinal[2] = (Integer(AdaptGain[2]))
-------- INT --------
Set VariableSet AdaptCurrent[3] = (Intelligence of BobUnit (Exclude bonuses))
Set VariableSet AdaptGain[3] = ((Real(AdaptCurrent[3])) + 0.10)
Set VariableSet AdaptFinal[3] = (Integer(AdaptGain[3]))
-------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of BobUnit) Equal to Chad (Bob)
(AdaptKills is A structure) Equal to False
Then - Actions
Hero - Modify Strength of BobUnit: Add (AdaptFinal[1] - AdaptCurrent[1]).
Hero - Modify Agility of BobUnit: Add (AdaptFinal[2] - AdaptCurrent[2]).
Hero - Modify Intelligence of BobUnit: Add (AdaptFinal[3] - AdaptCurrent[3]).
Else - Actions
Adaptability Copy
Events
Unit - A unit Dies
Conditions
Actions
Set VariableSet BobUnit = (Killing unit)
Set VariableSet AdaptKills = (Dying unit)
-------- STR --------
Set VariableSet AdaptCurrent[1] = (Strength of BobUnit (Exclude bonuses))
Set VariableSet AdaptGain[1] = ((Real(AdaptCurrent[1])) + 0.10)
Set VariableSet AdaptFinal[1] = (Integer(AdaptGain[1]))
-------- AGI --------
Set VariableSet AdaptCurrent[2] = (Agility of BobUnit (Exclude bonuses))
Set VariableSet AdaptGain[2] = ((Real(AdaptCurrent[2])) + 0.10)
Set VariableSet AdaptFinal[2] = (Integer(AdaptGain[2]))
-------- INT --------
Set VariableSet AdaptCurrent[3] = (Intelligence of BobUnit (Exclude bonuses))
Set VariableSet AdaptGain[3] = ((Real(AdaptCurrent[3])) + 0.10)
Set VariableSet AdaptFinal[3] = (Integer(AdaptGain[3]))
-------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of BobUnit) Equal to Chad (Bob)
(AdaptKills is A structure) Equal to False
Then - Actions
Hero - Modify Strength of BobUnit: Add (AdaptFinal[1] - AdaptCurrent[1]).
Hero - Modify Agility of BobUnit: Add (AdaptFinal[2] - AdaptCurrent[2]).
Hero - Modify Intelligence of BobUnit: Add (AdaptFinal[3] - AdaptCurrent[3]).
Else - Actions