![]() There are a few special events that are automatically triggered by the popcorn runtime, and some evolvers, if they are found in the event list: igger(!IsInsideTrigger & wasInsideTrigger) IsInsideTrigger = ntains(Position) Įigger(IsInsideTrigger & !wasInsideTrigger) create a new shape named, 'TriggerShape', that will be used as a trigger.create a new event named, for example, 'LeaveTrigger'.create a new event named, for example, 'EnterTrigger'.create a new particle field named, for example 'IsInsideTrigger', of type 'int'.If you want an enter/leave behavior, you can do that using a persistent particle field that will store the enter/leave state: Kill(shouldTrigger) // will kill the particle if 'Position.y < 0' For example, if you want to kill the original particle after triggering the event, you can do:īigger(shouldTrigger) // will trigger the event if 'Position.y < 0' You can add additional computations to handle this more gracefully. This means the event will be triggered each frame as long as the particle stays below y = 0. This will trigger the 'BelowGround' event whenever the particle 'y' position is below 0. Scripts can manipulate events through the 'Trigger' member functions:įor example, imagine we just created a custom event named 'BelowGround', that is supposed to be triggered whenever a particle goes below a horizontal plane at y = 0. This feature is not in the current version, but will be released soon: Note that you do not have to trigger an external Fx file, you can add local layers in the 'LayerGroups' folder, and they will appear in the 'EventAction' list Users can create custom actions by inheriting from the CActionFactory / CActionInstance classes in the C++ SDK The editor automatically fills the dropdown with all the actions of this type it knows about. NOTE: in the current editor version, this is ignored, and defaults to 'TriggerAlways' 3- EventAction Action to be triggered by the event. can be one of the following:ġ- TriggerAlways : There can be an unlimited number of trigger-always events 2- TriggerOnce : There can be at most 32 trigger-once events. 2- EventMode Determines the event trigger strategy. This is the name that will be published to scripts and to custom C++ event handlers. ![]() ![]() By default, there are no events.ġ- EventName Name of the event. ![]() The event list will appear inside the node properties panel. To access the particle events panel, unroll the layer you want to see, and select its 'Events' node. Particle events allow to spawn another particle effect, a sound, a decal, whatever you like, when something special happens on a given particle, such as when it is born, dies, collides with the physical world, or when a specific condition happens inside a script. Last update: v1.9.0 - See also: Particle system overview PopcornFX v2 documentation can be found here ! IMPORTANT ! This is a PopcornFX v1 page. ![]()
0 Comments
Leave a Reply. |