PDA

View Full Version : Particle question


xXziroXx
12-31-2006, 02:04 AM
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
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?


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

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

xXziroXx
12-31-2006, 02:35 AM
//#CLIENTSIDE
function onCreated()
{
with ( findImg( 200))
{
image = "bomb.png";
x = 100;
y = 100;
z = 5;
layer = 4;
}
player.chat = findImg( 200).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
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
particle.movementvector = {cos(serverr.env.wind.angle)*serverr.env.wind.stre ngth, -sin(serverr.env.wind.angle)*serverr.env.wind.stren gth, -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.


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/showthread.php?t=62877