Jump to content

Script works for me, not for my costumer. How can this happen?


Madeliefste Oh
 Share

You are about to reply to a thread that has been inactive for 4710 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I have made a gown in autumn style. The dress can lose leaves when you give the command "/5 fall on" and stop losing leaves when you give the command "/5 fall off" What the script actually puts on and off is a particle poofer with autumn leave textures.

Now I have the next case. A customer of mine who bought the dress is not able to use the script. I have tried some steps with her, and nothing seems to work.

- First I went to her land, wearing the dress myself. For me the the script works on her land, but not for her.
- I gave her a fresh version of the dress, to make sure nothing was messed up by her per accident. Also the fresh version did not work for her.
- I made the script listen to channel 8 in stead of channel 5. I tested it, for me it worked. But for her the script does still not work.

Anyone an idea what can be the matter?

 

 

 

Link to comment
Share on other sites

As Blackdog suggests, it sounds like you need to update the listener to listen to the new owner (I'm assuming, since it's a dress, only the wearer can talk to it).

Try dropping this changed event  into your script -- there are more elegant ways of doing it, but without seeing the script, this is all I can suggest that I know will do it.

 

changed(integer change){		if(change & CHANGED_OWNER){			llResetScript();		}	}

 

 

  • Like 1
Link to comment
Share on other sites

The most likely issue is that your lllisten() is not being set to the owner in ONREZ rather than State_start.  When the item is rezzed, the state_start for that state will not run again.  But the OnRez event within that state will occur, so you should set the llListen within OnRez to ensure the listen is for the correct owner. 

Alternatively, the owner can Reset all the scripts in the item and then state_start will execute, limiting the listen to her rather than you.

  • Like 1
Link to comment
Share on other sites

Thanks for your reactions so far. I don't have any scriptknowlegde myself, someone made the code for me, but this person is no longer in SL. This is the code:

 

 

 


integer g_intListenHandle = 0;


default

{

    state_entry()

    {

        g_intListenHandle = llListen(5,"",llGetOwner(),"");

        updateParticles();

    }

    listen(integer channel,string name,key id,string message)

    {

        if(message=="fall on") updateParticles();

        else

        if(message=="fall off") llParticleSystem([]);

        else llOwnerSay("usage:\n/5 fall off\nor:\n/5 fall on");

    }

}


 

 

 

Link to comment
Share on other sites

Add the lines Innula posted and it should be fine

 

integer g_intListenHandle = 0;default{    state_entry()    {        g_intListenHandle = llListen(5,"",llGetOwner(),"");        updateParticles();    }    listen(integer channel,string name,key id,string message)    {        if(message=="fall on") updateParticles();        else        if(message=="fall off") llParticleSystem([]);        else llOwnerSay("usage:\n/5 fall off\nor:\n/5 fall on");    }    changed(integer change){		if(change & CHANGED_OWNER){			llResetScript();		}	}}

 

 

 

  • Like 1
Link to comment
Share on other sites

Another way to do it would be to turn the listener on and off each time you wear it.   This way, though, it's only going to listen to you when it's worn:

 

integer g_intListenHandle;default{	state_entry()	{		updateParticles();	}	attach(key attached)	{		if (attached!=NULL_KEY){			g_intListenHandle=llListen(5,"",attached,"");		}		else{			llListenRemove(g_intListenHandle);		}	}	listen(integer channel,string name,key id,string message)	{		if(message=="fall on") updateParticles();		else			if(message=="fall off") llParticleSystem([]);		else llOwnerSay("usage:\n/5 fall off\nor:\n/5 fall on");	}}

 

 

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

obviously the owner change is one issue that can be addressed, and has. A second, I did not see mentioned in here, is whether or not your customer has, in her preferences, turned partlcle effects off, in which case she would not see the particles at all.  

 

Just a thought.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4710 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...