15.Let's Send triggers to change effects!¶
This chapter explains the trigger function of Effekseer. The trigger function can change effects during playback.
For example, as shown in the following example, a weapon that is being charged with energy can be triggered to fire.
Double-click to send the trigger.
Trigger is a mechanism that allows up to four triggers to be sent to the effect currently playing. The triggered effect can change its behavior according to the parameters set in the node.
The behavior change by the trigger is set in Common.
Common panel trigger settings
Sending triggers from the editor¶
Triggers can be sent from the controller panel.
0,1,2,3 button to send triggers
Send triggers from the game¶
There are APIs to send triggers to SDKs and plug-ins for each game engine.
This chapter explains using the sample file
Node configuration for the effects created in this chapter
When an effect is played, the following actions are performed.
Chargenode particles are generated and child node particles continue to be generated.
Lasernode particles are not generated.
When trigger 0 is sent to the effect, the following operation is performed.
Chargenode particles are deleted and particle generation in child nodes stops
Lasernode particles start generating and child node particles are also generated
Node to delete particles when triggered¶
Trigger settings for Charge node
Node that starts particle generation when a trigger is sent¶
Trigger settings for Laser node
Particles deleted by a trigger may disappear instantly, which may be unnatural.
In this case, you can set
Fade out after delete to make them disappear naturally by fading out.
Fade out within lifetime, the particle is faded out by deletion due to lifetime, but not by deletion due to trigger.
In both of the following examples, the particles are deleted by the trigger, but the fade-out behavior is different.
Fadeout within lifetime
Fadeout after destroyed
This chapter explained how to use triggers. Take advantage of triggers to create interactive effects.