Code Examples
v4.0
Last updated
v4.0
Last updated
Without modification, the periodic effects are calcuated when the GameCondition
object is created. If you'd like to specify the impact, you can use the SetPeriodicEffectValue()
method.
The "Instant Health" condition is "Instant", and affects the "Health" of the target. However, the min/max value for points are both 0
, meaning without modification, this will not have any impact at all.
The code below in DamageActor(
) will create a new GameCondition from the Instant Health Condition, and then set the value using the gameCondition.SetPeriodicEffectValue()
method, passing in the Health Stat object, and the min/max values.
The method will choose a random value between min and max, and assign that value to the effect, and also return the value chosen.