![]() |
Pixelpart 1.9.3
GameMaker Plugin
|
A Pixelpart effect can be modified at runtime with a GML script. This can be used to dynamically make an effect react to what is happening in your game.
Effect inputs are the primary technique to dynamically modify effect properties. The following example shows how the value of an effect input that has been defined in the Pixelpart editor can be changed with GML.
Depending on the data type, several set methods are available to change the value of effect inputs:
To retrieve the currently set input value, use the corresponding get methods:
These method are available for the obj_PixelpartEffect object as well as the PixelpartEffect struct.
Triggers are used to make effects react to events in your game. The following example shows how a trigger can be activated with GML using the activate_trigger method:
To check if a trigger has already been activated, use is_trigger_activated. These method are available for the obj_PixelpartEffect object as well as the PixelpartEffect struct.
In contrast to triggers, events are used to make the game react to something happening in the effect, for example to play an audio clip when an emitter starts producing particles. You can subscribe to effect_event to get notified when effect events occur:
The effect_event is available for the obj_PixelpartEffect object as well as the PixelpartEffect struct.