Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #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
  #2  
Old 04-11-2006, 02:46 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
attachtoowner = TRUE;
true is case sensative, is it not?

Edit:
Also noticed that you may want to add 'attachposition = true;' to the emitter.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")

Last edited by ApothiX; 04-11-2006 at 03:21 PM..
Reply With Quote
  #3  
Old 04-11-2006, 05:53 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Wouldn't it be better if you used a gani?
Reply With Quote
  #4  
Old 04-12-2006, 12:02 AM
Prozac Prozac is offline
one of the good guys
Prozac's Avatar
Join Date: Jan 2006
Posts: 245
Prozac is on a distinguished road
Send a message via AIM to Prozac
placing an emitter in a gani has worked for me,
then just replaceani(walk,whateveryouaniis)
and set it back when you want the emitter off.

also when you do replaceani, then you do not need to use a timeout.
you just turn if off after you use up your ammo/fuel/whatever contition sets the gani back to normal.
in my experience, timeouts that call emitters tend to make the emitters break.
Reply With Quote
  #5  
Old 04-15-2006, 01:39 PM
Raeiphon Raeiphon is offline
I never asked for this.
Join Date: Jun 2005
Posts: 855
Raeiphon is on a distinguished road
Good point, I'll gani it and see. Post results in a few.
__________________

I hope for nothing. I fear nothing. I am free.
Reply With Quote
  #6  
Old 04-15-2006, 07:16 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
If he doesn't want other people to see the particles, then a gani wouldn't be a good thing.

all he has to do is set attachposition to true
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
Reply


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 06:23 PM.


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