Hello,
I want to add Snow-Particles on top of my scene.
In Particle-Editor preview, they show up fine, but when I run the game nothing shows up at all.
First some pictures:
This is how it looks in Particle-Editor preview:
These are the Emitter Settings:
(Additionally: Position 0, 0, 1; Rotation 0, 0, 0; everything under “Particle” is set to 1 except Life Alpha (readonly) and Life Rotation are set to 0)
This is how the main.collection is set up (moved the particles a bit to the right because I thought they don’t show up because they are rendered behind the map (which is not the case)):
Inside the script next to particlefx I wrote:
function init(self)
particlefx.play("#particlefx", testpfx)
print("OK")
end
function testpfx(self, id, emitter, state)
-- 3 print(particlefx.EMITTER_STATE_POSTSPAWN)
-- 1 print(particlefx.EMITTER_STATE_PRESPAWN)
-- 0 print(particlefx.EMITTER_STATE_SLEEPING)
-- 2 print(particlefx.EMITTER_STATE_SPAWNING)
print("particle state: "..state)
end
function final(self)
particlefx.stop("#particlefx")
end
The console output looks like this:
INFO:ENGINE: Defold Engine 1.2.102 (d530758)
INFO:ENGINE: Loading data from: build/default
INFO:ENGINE: Initialised sound device ‘default’
DEBUG:SCRIPT: OK
DEBUG:SCRIPT: particle state: 1
INFO:DLIB: SSDP: Started on address 192.168.2.128
DEBUG:SCRIPT: particle state: 2
INFO:DLIB: SSDP: Done on address 192.168.2.128
So it seems like they are spawning (particle state 2 == particlefx.EMITTER_STATE_SPAWNING) but they don’t show up.
Can someone please shove me in the right direction, please?
~ Daniel