User Tools

Site Tools


en:examples:fx:dynamic_fx_values

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

en/examples/fx/dynamic_fx_values.txt · Last modified: 2021/11/29 04:14 (6 months ago) by sausage