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 11-15-2010, 11:35 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
Particle Emitters Disappearing + Level Changing

Alright here's my effect:

PHP Code:
if (created || playerenters || timeout) { 
  
with (findimg(50)) {
    
player.x;
    
player.y;
    
attachtoowner true;
    
attachoffset "-2.5,-2,0";
    
image "light2.png";
    
layer 3;
    
red .2;
    
green .5;
    
blue 0;
    
alpha .9;
    
zoom .4;
    
layer 2;
    if (
particleeffectsenabled) {
      
emitter.delaymin .4;
      
emitter.delaymax 1;
      
emitter.nrofparticles 1;
      
emitter.firstinfront false;
      
emitter.attachposition true;
      
emitter.continueafterdestroy true;

      
emitter.particle.lifetime .5;
      
emitter.particle.image "g4_particle_cloud.png";  
      
emitter.particle.red 0;
      
emitter.particle.green 1;
      
emitter.particle.blue 0;
      
emitter.particle.alpha .9;
      
emitter.particle.zoom .5;
      
emitter.particle.speed 0;

      
emitter.removemodifiers();
      
emitter.addlocalmodifier("once",0,0,"x","add"22.5);
      
emitter.addlocalmodifier("once",0,0,"y","add"12);
      
emitter.addlocalmodifier("once"00"spin""replace"13);
      
emitter.addlocalmodifier("once"00"zoom""replace".5.8);
      
emitter.addlocalmodifier("once"00"alpha""replace".6.9);
      
emitter.addlocalmodifier("once"00"green""replace"11);
      
emitter.addlocalmodifier("range"0.5"alpha""add", -1, -1);
    } 
  }
  
setTimer(1);

Standard procedure it just gets placed into a player's attr to display a poison ticking effect, then if you or the person with the effect changes levels it disappears.

If I 'refresh the effect' (clear the attr and re-add) it works fine and updating the gani file causes it to work as well.

I'm hoping there's a way to fix this in the gani file or if it's a bug that needs to be fixed.

See attached for the aftermath of changing levels.

Edit: Added the changes that made it work the way I wanted it to.
Attached Thumbnails
Click image for larger version

Name:	aftermath.jpg
Views:	386
Size:	105.9 KB
ID:	51946  
__________________
Quote:

Last edited by fowlplay4; 11-16-2010 at 09:10 PM..
Reply With Quote
  #2  
Old 11-16-2010, 05:45 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Why mix GS1 with GS2?
Reply With Quote
  #3  
Old 11-16-2010, 06:43 PM
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
The only error similar to this that I have encountered, is that if you use setlevel2 and teleport the player to the same level he already is in, all attached player ganis stop functioning.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #4  
Old 11-16-2010, 07:33 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
hmm try changing index > 200, don't know if it'll make a difference
__________________
Reply With Quote
  #5  
Old 11-16-2010, 09:16 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've tried the index thing, and the only solution I came upon was using a 1 second timeout.

I.e:
1. Player A poisons Player B
2. Both see the effect fine
3a. Player A leaves level and re-enters, and the poison effect isn't visible anymore but it still is to B.
3b. Player B leaves level and re-enters, and the poison effect isn't visible to Player A anymore but it still is to B.

I feel like there's an event that I'm missing or something that has to apply to the above, I thought it was onPlayerEnters but obviously not.

Oh and the mixing the GS1 and GS2 is just how it was and I didn't feel like changing it.
__________________
Quote:
Reply With Quote
  #6  
Old 11-17-2010, 04:52 PM
MrOmega MrOmega is offline
One More Time
MrOmega's Avatar
Join Date: Aug 2010
Location: TN, USA
Posts: 631
MrOmega is an unknown quantity at this point
Send a message via AIM to MrOmega Send a message via MSN to MrOmega Send a message via Yahoo to MrOmega
just throwing this idea out there. But would calling playerenters and timeout cause any issues over and over again? maybe do a playerenters and check to see if the poison is still in effect, if so end script, and let the timeout run uninterrupted, otherwise just call the timeout.
__________________
Time is the fire in which we burn...
Up, Up, Down, Down, Left, Right, Left, Right, B, A, Select, Start! Now I got 99 LIVES!!!
Reply With Quote
  #7  
Old 11-17-2010, 05:02 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
Quote:
Originally Posted by MrOmega View Post
just throwing this idea out there. But would calling playerenters and timeout cause any issues over and over again? maybe do a playerenters and check to see if the poison is still in effect, if so end script, and let the timeout run uninterrupted, otherwise just call the timeout.
No issues from what I can tell, and the timeout is the only thing that keeps the gani 'alive' for other players since created and playerenters don't seem to get called for them.
__________________
Quote:
Reply With Quote
  #8  
Old 11-17-2010, 06:26 PM
MrOmega MrOmega is offline
One More Time
MrOmega's Avatar
Join Date: Aug 2010
Location: TN, USA
Posts: 631
MrOmega is an unknown quantity at this point
Send a message via AIM to MrOmega Send a message via MSN to MrOmega Send a message via Yahoo to MrOmega
Quote:
Originally Posted by fowlplay4 View Post
No issues from what I can tell, and the timeout is the only thing that keeps the gani 'alive' for other players since created and playerenters don't seem to get called for them.
Well was just thinking that playerenters may be called for the one client when the player leaves and enters, causing the script to mess up.
__________________
Time is the fire in which we burn...
Up, Up, Down, Down, Left, Right, Left, Right, B, A, Select, Start! Now I got 99 LIVES!!!
Reply With Quote
  #9  
Old 11-23-2010, 05:56 PM
Jiroxys7 Jiroxys7 is offline
Hazard to Graal
Jiroxys7's Avatar
Join Date: Apr 2009
Posts: 343
Jiroxys7 will become famous soon enough
This sounds similar to (if not exactly like) the problem I posted about a good while ago.
(http://forums.graalonline.com/forums...hp?t=134260623)

The only solutions I got seem more convoluted than it needs to be. It would be nice if this thing, bug or intentional, was fixed/changed.

Edit: It looks like your problem may not be the exact same as mine, but it may be related. Personally I'm hoping it is, anyway =q

Further jargon/thinking out loud:

Perhaps that one new serverop (The one you told me was only useful on iphone, cant recall what it was called.) could be changed to adjust the visibility range of such particles on pc servers, while keeping it's current function on iphone servers? Instead of having particles get cut out if the viewer and the source are not in the same level, it would only be cut out if the viewer is however many levels/pixels/tiles/watever away from the source.

Then again, Since it seems that only the levels adjacent to the player's current level, as well as the player's current level are loaded (clientside) at a time, I don't see why we couldn't flat-out remove the limit because the player will never have more than 9 levels loaded at a time, so it's not like their computer will be burdened by displaying all particles offscreen to the ends of the gmap or anything. and if the current way particles are cut really matters, we could also instead make a new serverop: oldparticlerules=boolean (true will cut them out like they do currently, false will allow them to be displayed within the entire 3x3 level square. although I don't see what use setting it to false would actually have)
__________________
MY POSTS ARE PRONE TO EDITS!

Last edited by Jiroxys7; 11-23-2010 at 06:18 PM..
Reply With Quote
  #10  
Old 02-05-2011, 06:46 PM
Jiroxys7 Jiroxys7 is offline
Hazard to Graal
Jiroxys7's Avatar
Join Date: Apr 2009
Posts: 343
Jiroxys7 will become famous soon enough
Update (useless)/bump
Yep, I know where I've seen it before. My projectiles that use particle emitters will work just fine if you remain in your level. but if you cross a level on the GMAP, the projectile will appear to vanish. Don't know if my post above was actually related to it or not, but it's very annoying.

It's been quite some time though and it's still a problem. Think Stefan is even aware?

Also, onCreated() and onPlayerenters() unfortunately doesn't make any difference as far as fixing the problem goes.
__________________
MY POSTS ARE PRONE TO EDITS!
Reply With Quote
  #11  
Old 02-05-2011, 08: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
Are you using the latest V6? I believe he fixed the onPlayerEnters problem.
__________________
Quote:
Reply With Quote
  #12  
Old 02-05-2011, 09:58 PM
Jiroxys7 Jiroxys7 is offline
Hazard to Graal
Jiroxys7's Avatar
Join Date: Apr 2009
Posts: 343
Jiroxys7 will become famous soon enough
Quote:
Originally Posted by fowlplay4 View Post
Are you using the latest V6? I believe he fixed the onPlayerEnters problem.
I actually haven't because for some reason, It's now refusing to run. I can double-click the icon and it'll have the little hourglass next to the mouse for about a second, and then nothing else ever happens.
__________________
MY POSTS ARE PRONE TO EDITS!
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 12:07 AM.


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