Playing particle in Blueprints
Now that our particle effect is ready, let's play it using Blueprints:
- Right-click on Content Browser.
- Select the Blueprint class.
- From the resulting window, select Actor.
- Double-click on the Blueprint to open the editor.
- Select your bursting particles in Content Browser.
- Open the Blueprint editor and add a new Particle System Component (if you select the particle in Content Browser, it will automatically set that particle as the template for the Particle System Component).
- Go to the Event Graph tab.
- Right-click anywhere on the graph and select Add Custom Event… from the Add Event category.
- Rename that Custom Event with any name you like. For this example, I renamed it ActivateParticle.
- Create a graph like this:
This Blueprint will first execute ActivateParticle when the game begins and when the event is executed, it randomly selects a time (in seconds) between 0.2 and 2. When the time runs out, it activates the particle and calls this event again.
Now, if...