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
  #16  
Old 02-11-2010, 09:02 PM
Engine Engine is offline
Registered User
Join Date: Jan 2010
Posts: 70
Engine is on a distinguished road
Shouldn't this make the particle effects find the player? I have tried searching the forums but couldn't find anything about this. Can you even get the particles x/y and change it's angle after it has been emitted?
PHP Code:
function onTimeout(){
  
temp.dx = ((player.x+1.5) - (findimg(200).emitter.particle.x));
  
temp.dy = ((player.y+2) - (findimg(200).emitter.particle.y));
  
findimg(200).emitter.particle.angle getangle(temp.dx,temp.dy);
  
settimer(0.05);

Reply With Quote
  #17  
Old 02-11-2010, 09:17 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
You can't edit/change an emitted particle, you'll have to use the addlocalmodifier and so on to get what you're looking for.
__________________
Quote:
Reply With Quote
  #18  
Old 02-11-2010, 09:18 PM
Engine Engine is offline
Registered User
Join Date: Jan 2010
Posts: 70
Engine is on a distinguished road
Can you read a particles x/y after it has been emitted? like
PHP Code:
emitter.particle.x
because that doesn't seem to want to work when i do
PHP Code:
player.chat emitter.particle.x SPC emitter.partilce.y
Reply With Quote
  #19  
Old 02-11-2010, 09:40 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
I don't believe so since it works like this:

emitter.particle.property

When a particle emits, it uses the emitter, and particle variables that you defined and then it's out of your control.

If you want complete control over an image, you'll have to use a showimg/findimg method.
__________________
Quote:
Reply With Quote
  #20  
Old 02-12-2010, 05:13 AM
Engine Engine is offline
Registered User
Join Date: Jan 2010
Posts: 70
Engine is on a distinguished road
I ended up using move();
I'm having a problem of the particle hopping between players when they are both within range and then glitching out. I currently have the following in a loop move it using move(); I can't figure out why it keeps happening. I tried adding checks but I couldn't figure it out. Could someone tell me what I could do to keep it from jumping back and fourth between players?
PHP Code:
for (pl:findnearestplayers(this.x,this,y)){
if (
pl.x in |this.x-8this.x+8| && pl.y in |this.y-10this.y+10|){
  
this.dx = (pl.this.x);
  
this.dy = (pl.this.y);  
  break;  
  }

Reply With Quote
  #21  
Old 02-20-2010, 03:47 AM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura about
Send a message via AIM to adam
Yes, I have been wondering about altering my particle engine script to use emitters, but I guess for the great speed there is also sacrafice of dynamic control.
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
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 02:50 AM.


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