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 12-31-2006, 02:04 AM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
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?
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #2  
Old 12-31-2006, 02:22 AM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by xXziroXx View Post
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
__________________

Last edited by Chompy; 12-31-2006 at 02:35 AM..
Reply With Quote
  #3  
Old 12-31-2006, 02:35 AM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by Chompy View Post
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.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #4  
Old 12-31-2006, 02:37 AM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by xXziroXx View Post
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?
__________________
Reply With Quote
  #5  
Old 12-31-2006, 02:40 AM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
PHP Code:
particle.movementvector = {cos(serverr.env.wind.angle)*serverr.env.wind.strength, -sin(serverr.env.wind.angle)*serverr.env.wind.strength, -20}; 
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #6  
Old 12-31-2006, 02:49 AM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Well, I dunno if there is a built-in command for that, but meanwhile you could use a loop
__________________
Reply With Quote
  #7  
Old 12-31-2006, 06:20 PM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
I want to have particle rain that turns into splash particles. Something tells me that this will suck to do.
Reply With Quote
  #8  
Old 01-01-2007, 07:45 PM
Riot Riot is offline
Delteria Management
Join Date: Nov 2003
Location: Seminole County, Florida
Posts: 280
Riot is on a distinguished road
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
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 10:02 PM.


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