Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-31-2010, 12:27 AM
darkcloud667 darkcloud667 is offline
That One Guy.
darkcloud667's Avatar
Join Date: Dec 2009
Location: Missouri
Posts: 40
darkcloud667 will become famous soon enough
Emitter scripting problems.

alright.
so basically heres my problem, i have an effect, and it works fine.
until i move from one area to the other.
basically, im standing in npulse's level2, i see the stuff that the effect emits.
then i move to level3, and the lighting works, but the fog n stuff doesnt.
so i come here to you, my fellow graalians.

wat do.

EDIT: btw, ive tried setting a var to it to stay on and emit along the player, ive used attachtoowner, etc.
ive also tried to have it use a timeout to move it to the players x and y.

PHP Code:
//#CLIENTSIDE
function onWeaponFired() {
  
say2("Say '/hallo on' to turn on,
Say '/hallo off' to turn off."
);
  }
function 
onPlayerChats() {
 if(
player.chat == "/hallo on") {
with(findimg(200)) {
  
attachtoowner = true;
  
this.x = this.dx;
  
this.y = this.dy;
  
layer = 3;
  
emitter.particle.speed = 0;
  
emitter.particle.green = .9;
  
emitter.particle.blue = .9;
  
emitter.particle.red = .9;
  
emitter.particle.image = "g4_particle_smoke.png";
  
emitter.particle.lifetime = 5;
  
emitter.delaymin = .5;
  
emitter.delaymax = 1;
  
emitter.maxparticles = 20;
  
emitter.nrofparticles = 5;
  
emitter.particle.mode = 0;
  
emitter.particle.zoom = 1;
  
emitter.particle.alpha = .2;
  
emitter.particle.spin = 0;
  
emitter.particle.angle = 0;
  
emitter.particle.stretchx = 5;
  
emitter.particle.stretchy = .6;
  
emitter.continueafterdestroy = false;
  
emitter.addlocalmodifier("once", 0, 0, "speed", "replace", 1, 4.5);
  
emitter.addlocalmodifier("once", 0, 0, "stretchx", "replace", 2.5, 10);
  
emitter.addlocalmodifier("once", 0, 0, "zoom", "replace", 1, 2.5);
  
emitter.addlocalmodifier("range", 0, 2.5, "alpha", "replace", 0, .35);
  
emitter.addlocalmodifier("range", 2.5, 5, "alpha", "replace", .35, 0);
  
emitter.addlocalmodifier("once", 0, 0, "y", "replace", player.y-30, player.y+30);
  
emitter.addlocalmodifier("once", 0, 0, "x", "replace", player.x-30, player.x+30);
}
with(findimg(201)) {
  
attachtoowner = true;
  
this.x = this.dx;
  
this.y = this.dy;
  
layer = 3;
  
emitter.particle.speed = 5;
  
emitter.particle.green = 1;
  
emitter.particle.blue = 1;
  
emitter.particle.red = 1;
  
emitter.particle.image = "npulse-ghosteffect.png";
  
emitter.particle.lifetime = 3;
  
emitter.delaymin = .05;
  
emitter.delaymax = 1;
  
emitter.maxparticles = 10;
  
emitter.nrofparticles = 1;
  
emitter.particle.mode = 0;
  
emitter.particle.zoom = 4.5;
  
emitter.particle.alpha = .25;
  
emitter.particle.spin = 0;
  
emitter.particle.angle = degtorad(90);
  
emitter.continueafterdestroy = false;
  
emitter.addlocalmodifier("range", 0, 1.5, "alpha", "replace", 0, 1);
  
emitter.addlocalmodifier("range", 1.5, 3, "alpha", "replace", 1, 0);
  
emitter.addlocalmodifier("range", 0, 2.5, "zoom", "replace", 0, 3.5);
  
emitter.addlocalmodifier("once", 0, 0, "y", "replace", player.y-30, player.y+30);
  
emitter.addlocalmodifier("once", 0, 0, "x", "replace", player.x-30, player.x+30);
}
with(findimg(202)) {
  
attachtoowner = true;
  
this.x = this.dx;
  
this.y = this.dy;
  
layer = 3;
  
emitter.particle.speed = 0;
  
emitter.particle.green = 0;
  
emitter.particle.blue = 0;
  
emitter.particle.red = 0;
  
emitter.particle.image = "light4.png";
  
emitter.particle.lifetime = .15;
  
emitter.delaymin = .15;
  
emitter.delaymax = .15;
  
emitter.maxparticles = 1;
  
emitter.nrofparticles = 1;
  
emitter.particle.mode = 0;
  
emitter.particle.zoom = 10;
  
emitter.particle.alpha = .5;
  
emitter.particle.spin = 0;
  
emitter.particle.angle = degtorad(90);
  
emitter.continueafterdestroy = false;
}
}
  if(
player.chat == "/hallo off") {
with(findimg(200)) {
  
this.x = this.dx;
  
this.y = this.dy;
  
emitter.particle.speed = 0;
  
emitter.particle.green = 0;
  
emitter.particle.blue = 0;
  
emitter.particle.red = 0;
  
emitter.particle.image = "";
  
emitter.particle.lifetime = 0;
  
emitter.delaymin = 0;
  
emitter.delaymax = 0;
  
emitter.maxparticles = 0;
  
emitter.nrofparticles = 0;
  
emitter.particle.mode = 0;
  
emitter.particle.zoom = 0;
  
emitter.particle.alpha = 0;
  
emitter.particle.spin = 0;
  
emitter.particle.angle = 0;
  
emitter.particle.stretchx = 0;
  
emitter.particle.stretchy = 0;
}
with(findimg(201)) {
  
this.x = this.dx;
  
this.y = this.dy;
  
emitter.particle.speed = 0;
  
emitter.particle.green = 0;
  
emitter.particle.blue = 0;
  
emitter.particle.red = 0;
  
emitter.particle.image = "";
  
emitter.particle.lifetime = 0;
  
emitter.delaymin = 0;
  
emitter.delaymax = 0;
  
emitter.maxparticles = 0;
  
emitter.nrofparticles = 0;
  
emitter.particle.mode = 0;
  
emitter.particle.zoom = 0;
  
emitter.particle.alpha = 0;
  
emitter.particle.spin = 0;
  
emitter.particle.angle = 0;
  
emitter.particle.stretchx = 0;
  
emitter.particle.stretchy = 0;
  }
with(findimg(202)) {
  
this.x = this.dx;
  
this.y = this.dy;
  
emitter.particle.speed = 0;
  
emitter.particle.green = 0;
  
emitter.particle.blue = 0;
  
emitter.particle.red = 0;
  
emitter.particle.image = "";
  
emitter.particle.lifetime = 0;
  
emitter.delaymin = 0;
  
emitter.delaymax = 0;
  
emitter.maxparticles = 0;
  
emitter.nrofparticles = 0;
  
emitter.particle.mode = 0;
  
emitter.particle.zoom = 0;
  
emitter.particle.alpha = 0;
  
emitter.particle.spin = 0;
  
emitter.particle.angle = 0;
  
emitter.particle.stretchx = 0;
  
emitter.particle.stretchy = 0;
  }
  }
} 
__________________
"Time is a great teacher, but unfortunately it kills all its pupils."

"Friendship is like peeing on yourself: everyone can see it, but only you get the warm feeling that it brings."

"The man who smiles when things go wrong has thought of someone to blame it on."
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 10:57 PM.


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