SendAppearanceEffect Endlessly Looping
Yesterday I discovered SendAppearanceEffect , thought it was super cool (still do) and started thinking of all the things I could do with it. My idea was to create invisible, untargetable NPCs to add particle effects to certain areas of certain zones.
This looks awesome, but I've encountered a problem with it that hopefully is caused by the way I scripted this. The particle effect seems to endlessly loop, spawning itself over and over and over again until my nice looking particles become a jumbled mess of lag. Included are some pictures to show what I mean, and also the script I am using to spawn the particle effects. http://i59.tinypic.com/f3ytk6.png http://i60.tinypic.com/69ib09.png Code:
sub EVENT_SPAWN |
I solved this on my own, by coding it as such:
Code:
sub EVENT_SPAWN |
On second thought, this effect disappears when leaving the zone and then coming back. Is there any way to keep these particle effects from disappearing when someone leaves the zone?
|
Here is a solution to your issue.
When Trevius originally got this packet working he made it so there was an option to send these to an individual client. So, assuming that your particle is 'static' as in, you send it once it stays for the client, this is what you can do. Initially, send your particle packet just like you are with the NPC as it is. And then for clients that zone in, you will need to send the particle to them so that they get the static particle spawned on their screen as well, BUT you only want to send it to that specific client so that you don't have the overlapping particle mess appear on other clients. Code:
Perl_croak(aTHX_ "Usage: Mob::SendAppearanceEffect(THIS, parm1, parm2, parm3, parm4, parm5, singleclient)"); Something like this. player.pl Code:
sub EVENT_ENTERZONE{ Does that make sense? |
Yes, Akka, that makes perfect sense. I am slowly but surely getting the hang of this stuff. Great learning experience! Thanks for your help, you rock.
|
That thing was starting to show signs of life...
|
All times are GMT -4. The time now is 06:30 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.