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 04-10-2006, 02:39 PM
Raeiphon Raeiphon is offline
I never asked for this.
Join Date: Jun 2005
Posts: 855
Raeiphon is on a distinguished road
Particle Effects: Following the player/object?

NPC Code:

with (findimg(200))
{
attachtoowner = TRUE;

layer = 3;

with (emitter)
{
emissionoffset = {1,1.5,0};

delaymin = 0.1;
delaymax = 0.3;

nrofparticles = 1;
particletypes = 3;

continueafterdestroy = TRUE;

with (particles[0])
{
lifetime = 200;
speed = 1;
zangle = -3;

image = "light4.png";
zoom = 0.1;
alpha = 0.3;
}

addlocalmodifier("impulse", 0, 0, "zangle", "add", degtorad(-35), degtorad(35));
addlocalmodifier("once", 0, 0, "x", "replace", player.x, player.x);
addlocalmodifier("once", 0, 0, "y", "replace",player.y, player.y);
addlocalmodifier("once", 0, 0, "red", "replace", 0.1, 0.1);
addlocalmodifier("once", 0, 0, "green", "replace", 0.1, 0.1);

addlocalmodifier("once", 0, 0, "blue", "replace", 0.9, 0.1);
addlocalmodifier("once", 0, 0, "speed", "replace", 1, 2);
addlocalmodifier("range", 0, 0.75, "alpha", "add", 0.1, 0.5);
addlocalmodifier("range", 0.75, 400, "alpha", "add", 0, -0.9);
}
}



That's in a timeout function, but it only appears where I set it once, and not actually follow me like I try to. What do I change to make it do that?

EDIT: I have it following me now, but, it does that for all of 5 or so seconds then stops, yet keeps emitting. Why?
__________________

I hope for nothing. I fear nothing. I am free.

Last edited by Raeiphon; 04-10-2006 at 04:37 PM..
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 03:47 AM.


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