I have created an erupting volcano map, by adding a particle emitter to the caldera (volcano's crater), in the editor, with Realtime Render option ticked, it displays the blobs of lava flying out all around the volcano.
When I try to run it from script, in debug or run, the map loads but the emitter does not display. I thought maybe its been Reset and I need to get it to Play().
I can not find how to reference the objects which show in the Scene tab in the map editor, from Lua script.
I don't want to create the emitter, and set its values, within the script.
In App.lua i've set up the map to load
--Load a map
local mapfile = system:GetProperty("map","Maps/Erruption.map")
If Map:Load(mapfile,1)==false then return false end
// play ParticleEmitter2 which is the last item added on the Scene tab in the map editor.
ParticleEmitter2.Play()
// gives Error attempt to index global 'PaticleEmitter2' (a nil value)
return true
end
How should I reference that emitter contained in the loaded map using lua code?
Ive tried, prefixing the line with self.map., self.world.map. , self.context.map. self.world: and lots of other combos to no avail.