|
RaptonX Zorger
Registered User
Join date: 26 Jan 2006
Posts: 79
|
04-15-2006 11:48
I have created this dragon ave with 6 differnt breath weapons, however, when I rez upon logging in it fires for no reason, or soemtimes upon teleport.....it does not always do it, but seriously.........its kinda odd.
Now I have one listen script that sends link messages to the correct breat hweapon scripts, there are 3 prims that emit particals, and each containing severl scripts (I seperated the scripts accordign to breath type. I also noticed that whenever I save shanges in the listne script it sets off a differnt one.............. Is it because I did not put one partical script per prim even if they are not all triggered at the same time? Or is there another reason???
|
|
ed44 Gupte
Explorer (Retired)
Join date: 7 Oct 2005
Posts: 638
|
debugging code
04-15-2006 16:45
You need to monitor what your scripts are doing. I use a global variable early in my scrip (before default) integer gDebug = TRUE;
This is one of my link message listening routines: link_message (integer sender_num, integer num, string str, key id) { if ((num >= 300) && (num < 400)) { if (gDebug) llOwnerSay ("M link_message " + (string) num + "/" + str + "/" + (string) id + "/" + (string) llGetFreeMemory ()); if (num == 301) // back from settings llMessageLinked(LINK_THIS, 99, "", ""); // open HUD } }
I have a heap of these and each of my scripts listens to a different range of num's. This one only responds from 300 to 399. So on my screen I can see what my program is doing. To reduce stack depth, probably better to: link_message (integer sender_num, integer num, string str, key id) { if ((num < 300) || (num >= 400)) return; if (gDebug) llOwnerSay ("M link_message " + (string) num + "/" + str + "/" + (string) id + "/" + (string) llGetFreeMemory ()); if (num == 301) // back from settings llMessageLinked(LINK_THIS, 99, "", ""); // open HUD
// other if statements here }
This way you can see why your scripts are activated and set dBug = FALSE when you have it all sorted out.
|
|
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
|
04-15-2006 18:34
Particles are prim parameters, not a script thing.
When you set up a breif particle burst (specific particle srouce time) that stays with the prim. A newly rezzed version of that prim means it does that particle effect again - so anything that updates the world ( like when you rez in on teleport) the prim does the particles.
To prevent that, turn off the particles to the prim when you're done with the effect by sending an emtpy list: llParticleSystem([]);
|
|
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
|
04-15-2006 19:45
From: Jillian Callahan When you set up a breif particle burst (specific particle srouce time) that stays with the prim. A newly rezzed version of that prim means it does that particle effect again Aha! that's pretty cool... now what do I know of that might be doing that? Someone's splashable water, perhaps? 
|
|
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
|
04-16-2006 01:19
From: Argent Stonecutter Aha! that's pretty cool... now what do I know of that might be doing that? Someone's splashable water, perhaps?  At first, yes. But for the "velocity sensitive" splashes, the script does an llParticleSystem() on rez so it can choose which splash to use. The most famous example of using the prem-rez-get-particles effect is the telepoofer.
|