The goal: A free vendor that gives away a bunch of basic scripts.
The problem: as soon as a script is put in teh vendor it starts running.
Anyone got a way to do this, other than converting all the scripts to notecards?
These forums are CLOSED. Please visit the new forums HERE
How do I deactivate a script before I put it in an object? |
|
Nepenthes Ixchel
Broadly Offended.
Join date: 6 Dec 2005
Posts: 696
|
01-24-2006 00:02
The goal: A free vendor that gives away a bunch of basic scripts.
The problem: as soon as a script is put in teh vendor it starts running. Anyone got a way to do this, other than converting all the scripts to notecards? |
Zany Golem
Purple Freak
![]() Join date: 30 Oct 2005
Posts: 113
|
possible solution
01-24-2006 00:18
ok this might work but I haven't tested it
Try dumping all your scripts into some random prim (one that can be deleted) Then while you've got the prim in edit mode go to Tools-> Set Scripts in selection to NOT running then take them out and put them into your vendor I'm not sure if the not running will hold true but it's worth a shot unless someone else gives a better response lol |
SunenRec Ayoob
Registered User
Join date: 29 Dec 2004
Posts: 61
|
temporary & permanent solutions
01-24-2006 01:50
At the moment if you hold down CTRL while dragging a script into an objects contents the script will be set to not running.
I always figured this was just a handy undocumented feature but apparently according to this post by Karen Linden in the Known Issues forum its actually a bug (so dont rely on it working forever). A more sensible long term option would be to create a 'loading prim' which uses llRemoteLoadScriptPin to add the scripts to the vendor contents (as this command allows you to set the running state of the script to true or false). Alternatively you could look at using llSetScriptState to disable scripts as they're dropped into the objects contents but if you do it's worth remembering that you can't use the changed event to detect if a script has been added to an objects contents because dragging a script into an object from your inventory won't trigger the event (not sure why, seems kinda dumb to me, maybe it has something to do with it triggering the changed event and the state_entry event simultaneously in the newly added script). Instead you could try using a timer to regularly check the contents of the vendor then having a 'Load Vendor' option to set it running and then disable it once the vendor set up is complete (so you're not constantly checking the vendor contents and contributing unnecessary lag) Of the last 2 options i'd probably go with the 'Loading Prim' idea as it seems the most elegant... you could always incorporate the llSetScriptState + Timer idea to disable the scripts as you drag them into the loader too. Hope that helps! ![]() Sun. |
Nepenthes Ixchel
Broadly Offended.
Join date: 6 Dec 2005
Posts: 696
|
01-25-2006 00:59
I'll try the ctrl-drag trick.. some scripts would destroy the loading prim as soon as they are put in. (enable phantom and physics but dont get a chance to do any movement... bye bye prim)
Just for fun I tried dragging all of my scripts into a prim at once. My poor plywood cube turned into a rock, caught fire and flew up smashing me in the face before turning invisible and flying off into the sky trialing a thick cloud of smoke. I have no idea what became of it as it was never returned to my inventory. |
SunenRec Ayoob
Registered User
Join date: 29 Dec 2004
Posts: 61
|
01-25-2006 03:21
Well for the really dangerous scripts you could always just hit the New Script button, untick the Running box, paste your code in and then save and rename the script...
Kinda tedious but probably the safest and least complicated method of all (apart from the CTRL-Drag thing... as long as it still works) |
Greg Hauptmann
Registered User
Join date: 30 Oct 2005
Posts: 283
|
01-25-2006 04:23
I just had this problem with a script I wrote to do some clean up, which had to delete itself afterwards. I wrote it in the inventory but when I transfered it to the root prim ready for rollout to all the linked prims it would delete itself before I could start the process
![]() I basically realised I had to create a script in the prim via NEW SCRIPT and then copy/paste the code in. I'll try the CTRL trick too. |
Argent Stonecutter
Emergency Mustelid
![]() Join date: 20 Sep 2005
Posts: 20,263
|
Alternate idea.
01-25-2006 06:17
Don't just put the scripts in the box. Put the scripts in their own demo boxes with notes and any necessary textures, animations, sounds, etcetera. that gives you better organization and the student can see what the script does right away.
|
SunenRec Ayoob
Registered User
Join date: 29 Dec 2004
Posts: 61
|
01-25-2006 07:21
Don't just put the scripts in the box. Put the scripts in their own demo boxes with notes and any necessary textures, animations, sounds, etcetera. that gives you better organization and the student can see what the script does right away. A very good point in most cases ... the exception being those aforementioned scripts that "smash them in the face before turning invisible and flying off into the sky trialing a thick cloud of smoke."... Unless what you're trying to teach them is to beware of strangers offering free boxes of scripts, which actually isn't bad advice! ![]() |
Argent Stonecutter
Emergency Mustelid
![]() Join date: 20 Sep 2005
Posts: 20,263
|
01-25-2006 10:09
Well, if they weren't trying to run ALL the scripts at once, that wouldn't happen...
|
Oasis Perun
Registered User
Join date: 2 Oct 2005
Posts: 128
|
01-25-2006 10:16
*edited*too slow to post todaylol (didnt see the comment about the notecards)lol.. I think that would be the most effective way for disturbuting scripts for a "library purpose".
Later O _____________________
|