Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-16-2015, 11:45 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Modifying existing particles with particle properties

Is there any way to modify particles based on the properties of the particles themselves? What I'm trying to do is modify a particles x/y movement dependent on its height. I want the particles to move faster if they're higher in the air, based on player input(walking).

This is my attempt:
Graal Script Code:
  temp.emitter findimg(200).emitter;
  if (
abs(temp.dx) > 0) {
    
with (temp.emitter) {
      
addglobalmodifier("once"05"x""add", -temp.dx*particles[0].z,-temp.dx*particles[0].z);
    }
  } 
But obviously it doesn't work or I wouldn't be here.
Reply With Quote
  #2  
Old 06-28-2016, 08:51 AM
DrakilorP2P DrakilorP2P is offline
Registered User
DrakilorP2P's Avatar
Join Date: Apr 2006
Posts: 755
DrakilorP2P is just really niceDrakilorP2P is just really nice
I don't think so. There's no way to read or write the variables of particles; fairly literal fire and forget.

The particles[] array you're accessing is just templates/prototypes/classes which hold the starting variables of the actual particles.

You could maybe be dynamic with the modifiers though by repeatedly doing removemodifiers() and add*modifier() but I'm not sure how well that works or if it could get laggy.
__________________
Testbed user: I figured since I can never find any scripters it was time to take desperate measures...and...TEACH MYSELF 0.0
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 11:38 PM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright (C) 1998-2008 Linux cyberjoueurs All Rights Reserved.