Table of Contents

Dynamic FX Values

When you need to change the values in the FX. Any further objects created using the FX will use the new values.

Code

if (orxConfig_PushSection("GrowFXSlot")){
	orxConfig_SetFloat("EndValue", someNewScaleVectorValue.fX);					
	orxConfig_PopSection();
}
 
orxObject_CreateFromConfig("ObjectUsingGrowFX");

Config

[GrowFX]
SlotList        = GrowFXSlot
Loop            = false
DoNotCache 	= true ;<----- this is the important setting. Allows the values of the FX to change
 
[GrowFXSlot]
Type            = scale
Curve           = linear
StartTime       = 0.0
EndTime         = 1.0
StartValue      = 0.1
EndValue        = 1.0 ; <----- value when app starts. But our code will alter this. 
Absolute        = true
 
[ObjectUsingGrowFX]
FXList          = GrowFX