Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-22-2005, 04:28 AM
prozac424242 prozac424242 is offline
Registered User
prozac424242's Avatar
Join Date: May 2001
Location: Gone crazy: back soon
Posts: 356
prozac424242 is on a distinguished road
Send a message via ICQ to prozac424242 Send a message via AIM to prozac424242
particle emitter question

Ok, I read the graal wiki guide and the document file posted here on particle emitters, but why does this code not work? And its a weapon on the server.

NPC Code:

//test of particle engine
//#CLIENTSIDE
function onCreated() {
showimg(1,"block.png",player.x,player.y);
with (findimg(1)) {
image = "light2.png";
layer=1;
x = player.x - 3;
y = player.y - 3;
alpha = .9;
emitter.attachposition=false;
emitter.delaymin=.05;
emitter.delaymax=1.0;
emitter.emissionoffset=playerx-3,playery-1,2;
emitter.firstinfront=true;
emitter.nrofparticles=3;
emitter.maxparticles=50;

//particle attributess

emitter.particle.lifetime=5;
emitter.particle.checkbelowterrain=false;
emitter.particle.clippingbox=0,0,-1,64,64,64;
emitter.particle.image=light2.png;
emitter.particle.mode=0;
emitter.particle.alpha=.5;

emitter.particle.zangle=pi;
emitter.particle.stretchx=2;

}


}
if (weaponfired)
{
emitter.emit();

}





nothing shows up on the screen when i fire the weapon.
__________________

Useful links:
Graal Stats
Client Script Functions-GS1 to GS2
Serverside Script Functions-Gscript page
Particle Engine-Player Attributes
Server Options-Admin rights-Gmaps
Quote:
Originally Posted by Admins
Thanks for developing and improving playerworlds and such
Reply With Quote
  #2  
Old 09-22-2005, 04:37 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
I haven't played around with emitters that much yet but maybe try ...

PHP Code:
with (findimg(1)) {
  
emitter.emit();

Also, you can use function onWeaponFired()
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #3  
Old 09-22-2005, 04:45 AM
ForgottenLegacy ForgottenLegacy is offline
-Backtoscripts-
Join Date: Aug 2003
Location: California
Posts: 289
ForgottenLegacy is on a distinguished road
Send a message via AIM to ForgottenLegacy
Quote:
emitter.emissionoffset=playerx-3,playery-1,2;
Emissionoffset is in delta, not absolute. As in, use "-3","-1", and "2". Also, it's an array, remember? You need the {} things.
Quote:
emitter.particle.clippingbox=0,0,-1,64,64,64;
Another array, and also check this one versus the DocuEmitters.txt. Use {} thingeys.
Quote:
if (weaponfired)
{
emitter.emit();

}
You need the thing inside a findimg(), otherwise it won't know which emitter to emit.
__________________
"The higher you fly, the harder it is to breathe."

[Kaidenn] Maybe I will somehow take control of Lance's body when he isn't looking, have him log onto Kingdoms, update one script, and leave.
[Kaidenn] And leave him exactly where I found him, unchanged and completely unnaware of what just took place the last two minutes.
[GrowlZ] Lance: You might want to lock your bedroom door tonight
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 01:08 AM.


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