So, I was reading the fine wiki, and I noticed that you can have particles emit other particles. (Called sub-emitters)
NPC Code:
findimg(100).emitter.particle.emitter
Yet, when I set up a script to do just this... the sub-emitter ceases to emit particles (lending doubt to the notion that they really exist)
I've put some sample code together here:
NPC Code:
function onCreated() {
test();
}
function test() {
//Create the Showimg for the particle effects
with(findimg(100)) {
//Position in the middle of the viewing screen
x = screenwidth/2;
y = screenheight/2;
layer = 4;
//Set up the main emitter
with(emitter) {
particle.speed = 100;
particle.angle = 0;
particle.alpha = 1;
particle.image = "bomb.png";
particle.spin = 0;
particle.lifetime = 10;
particle.movementvector = {20,0,0};
attachposition = true;
autorotation = false;
cliptoscreen = true;
wraptoclippingbox = true;
delaymin = 1;
delaymax = 1;
nrofparticles = 1;
maxparticles = 10;
//Set up the so called 'sub emitter'
with(particle.emitter) {
particle.alpha = .5;
particle.speed = 100;
particle.image = "bomb.png"
particle.lifetime = 10;
particle.movementvector = {0,20,0};
delaymin = 1;
delaymax = 1;
nrofparticles = 1;
maxparticles = 5;
}
}
}
}
This should have bombs coming out horizontally (moving right) and those bombs should emit other bombs vertically (moving down)... However only the horizontal bombs show up.
If this code is wrong some how, I welcome anyone to fix it, because this issue its truly perplexing. If sub-emitters are indeed a valid Gscript2 construct, that I would think this code would work. But since it does not, there must be something wrong with it that I can't see anymore having looked at it too long. Fresh perspectives welcome