Particle effect example - fire and smoke

This example shows a simple particle effect for imitating fire and smoke.

Project files

The particlefx consists of two emitters: for fire and smoke. Each of them has tweaked properties, images and modifiers. All combined creates a fire and smoke effect.

Fire emitter has a flame animation from sprites.atlas. It is in front, because its Z position is 0.1, while smoke is at Z equal to 0.

It has two modifiers:

Changed properties (from default):

Additionally, the curves for Life Scale, Life Red, Life Green and Life Alpha properties were adjusted:

Smoke emitter has a smoke animation from sprites.atlas.

It has two modifiers:

Changed properties (from default):

Additionally, the curves for Life Scale, Life Alpha and Life Rotation properties were adjusted:

Scripts

fire_and_smoke.script

function init(self)
	particlefx.play("#particles") -- <1>
end

--[[
1. Start playing the particle effect in component "particles" in this game object.
--]]