Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 12-31-2006, 08:43 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
Unhappy Sub-Emitters

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
__________________

subliminal message: 1+1=3
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:46 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.