Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   Particle question (https://forums.graalonline.com/forums/showthread.php?t=71119)

xXziroXx 12-31-2006 02:04 AM

Particle question
 
How can I make a particle do something once it has moved to the location I want?

For example, once the rain has has gone from # z to 0 z, I want it to show a splash on that location (the x of the rain change as well of course) - how would I do that?

Chompy 12-31-2006 02:22 AM

Quote:

Originally Posted by xXziroXx (Post 1258946)
How can I make a particle do something once it has moved to the location I want?

For example, once the rain has has gone from # z to 0 z, I want it to show a splash on that location (the x of the rain change as well of course) - how would I do that?

PHP Code:

//#CLIENTSIDE
function onCreated()
{
  
with findImg200))
  {
    
image "bomb.png";
    
100;
    
100;
    
5;
    
layer 4;
  }
  
player.chat findImg200).z// returns 5


You can use that for emitters too, like a loop outside the emitter

xXziroXx 12-31-2006 02:35 AM

Quote:

Originally Posted by Chompy (Post 1258948)
PHP Code:

//#CLIENTSIDE
function onCreated()
{
  
with findImg200))
  {
    
image "bomb.png";
    
100;
    
100;
    
5;
    
layer 4;
  }
  
player.chat findImg200).z;


findImg( 200).z returns 5

You can use that for emitters too, like a loop outside the emitter

Well, I know I could use a loop for it, I was wondering if there were a way to do it WITHOUT a loop, a local modifier or something.

Chompy 12-31-2006 02:37 AM

Quote:

Originally Posted by xXziroXx (Post 1258952)
Well, I know I could use a loop for it, I was wondering if there were a way to do it WITHOUT a loop, a local modifier or something.

What you use to lower the z?

xXziroXx 12-31-2006 02:40 AM

PHP Code:

particle.movementvector = {cos(serverr.env.wind.angle)*serverr.env.wind.strength, -sin(serverr.env.wind.angle)*serverr.env.wind.strength, -20}; 


Chompy 12-31-2006 02:49 AM

Well, I dunno if there is a built-in command for that, but meanwhile you could use a loop :)

Twinny 12-31-2006 06:20 PM

I want to have particle rain that turns into splash particles. Something tells me that this will suck to do.

Riot 01-01-2007 07:45 PM

I believe you want dropemitter.

Quote:

Originally Posted by Stefan
emitter.dropemitter, emitter.dropwateremitter - those work exactly like the emitter itself (e.g. you can edit emitter.dropemitter.particle) and are used for emitting particles once a particle drops on the ground (rain drops) or the lifetime is over (for fireworks) - once a particle is dropping the emitter is calling dropemitter.emitat() to produce the drops; if there is a dropwateremitter and the particle was dropping on water then it is using the dropwateremitter for the drop effect

This was added back in v4.03 and Stefan posted a sample here: http://forums.graalonline.com/forums...ad.php?t=62877


All times are GMT +2. The time now is 04:51 PM.

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