Jump to content

Q: Loading a script not running


Wandering Soulstar
 Share

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

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

Recommended Posts

Hello All,

As I debug my current project, I have come across a situation and was hoping someone had a simple solution for me. I am burning brain cells for how I might do it in code but as I said, hoping there is an easier way out.

What I have is a script that, when a user drops it into a prim it sets the state of any other scripts in the prim to not running, which is all well and good and the way I want it to work. BUT there is a scenario where this script could be dropped onto a repository HUD prim and this is a case where I definitely do not want it to be running, having it turn off the other scripts in the prim would not be a good thing.

As I said, I am looking at code ways of doing this, but was wondering if there is a simple way for the user to drop a script onto a prim in such a way that the script is added to the prim, but starts in a not running state.

 

Thanks in advance!

Wanda Soulstar

Link to comment
Share on other sites

How about testing, first thing in state entry, for llGetLinkNumber?   If the script is not in the root prim, go straight to state active and start turning things off.  If it is in the root prim, go straight to state inactive, and wait until you get a link message or whatever telling you to go to state active?

Having said that, I'd advise you to see if you can't do the whole thing more efficiently and simply from one single script.   Turning scripts on and off, as opposed to switching integer constants between TRUE and FALSE and only doing things if the constant is TRUE, or even having multiple scripts that switch to between active and inactive states,  is usually over-complicating it.

Link to comment
Share on other sites


Wandering Soulstar wrote:

As I said, I am looking at code ways of doing this, but was wondering if there is a simple way for the user to drop a script onto a prim in such a way that the script is added to the prim, but starts in a not running state.

Holding down Ctrl while dragging a script to a prim inventory will include it not running

I am confused about what a "not running state" is,

is it a LSL state doing nothing or 'state' in a more general sense where the script simply isn't running?

:smileysurprised::):smileyvery-happy:

Link to comment
Share on other sites

Sorry Dora, should not have used the word state, just meant that the script is set to not running.


I was wondering about the 'CTRL' drop option and would have checked but the wifi here on the train cannot handle a connection to SL :-)

 

 @Innula - Regarding your suggestions, woill not work as any script dropped on a link-set is always dropped into the root prim. As to the comments on design, there is a very real and core design principler as to why this is as it is, actually it is the very reason for the HUD and system I am designing.

Link to comment
Share on other sites


Wandering Soulstar wrote:

 
@Innula
- Regarding your suggestions, woill not work as any script dropped on a link-set is always dropped into the root prim. As to the comments on design, there is a very real and core design principler as to why this is as it is, actually it is the very reason for the HUD and system I am designing.

Not if you use edit linked parts.   Sorry, but I thought from the way you described the problem that normally that's what the user would be doing.   Under normal circumstances, are you putting the script into a hud or into something else?

Link to comment
Share on other sites

The situation that I need to cover is the user dropping the script onto a HUD, where edit linked parts is not a realistic option, nor would it be a normal way the user would expect to use the HUD. In the other drop scenario, they would be dropping it onto a 'stand-alone' prim .. so in both cases would be going onto the root prim.

Link to comment
Share on other sites

Innula .. you found my answer! I actually do not want to rely on the link of the prim, nor on the name, but I can be certain that when it is dropped into the repository, the scenario where I do not want it to do anything, that a certain other script will be there and I can check for that by name.


Thanks!!!!!

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3603 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...