Jump to content
Wandering Soulstar

LogOut/Region Change - Events in scripts

Recommended Posts

14 minutes ago, Qie Niangao said:

 

LL have definately made some changes code wise. Late last year some code that ran before stopped running. This was due to poor coding in the first place or i should say things like  ( ) where they should not be and still ran. I and many have had this throw up. It is always something minor.

Share this post


Link to post
Share on other sites
18 hours ago, Wandering Soulstar said:

The reload could take quite a long time due to the inbuilt delay. There could be multiple worker scripts in each prim (only one running at any one time), so say 200 prims, 3 worker scripts, 2 sec delay per (if I remember properly) = 20mins to reload. 

No , or only in a naive script version .

In fact , when you have important delays , you use recursivity :

at the first step , 1  prim gives 1 script ton an another prim ; so now , 2 prims have one script

wait the delay

at the second step , 2 prims give 1 script to 2 anothers prims ; so now , 4 prims have one script

wait the delay

at the third step , 4 prims give 1 script to 4 another prims ; so now , 8  prims have one script

wait the delay

at the fourth step , 8 prims give 1 script to 8 another prims ; so now , 16 prims have one script

wait the delay

at the fifth step , 16 prims give 1 script to 16  another prims ; so now , 32  prims have one script

wait the delay

at the sixth step , 32 prims give 1 script to 32 another prims ; so now , 64 prims have one script

wait the delay

at the sixth step , 64 prims give 1 script to 64 another prims ; so now , 128 prims have one script

wait the delay

at the sixth step , 128 prims give 1 script to 128 another prims ; so now , 255 ( you can t have 256 prims linked ) prims have one script

 

So in fact you will have maybe 7 delays , and not 200-256 delays : in 20-30 seconds , all prims have one scrpt ( one delay for llremoteloadscript pin is 3 seconds )

I can give you an instance of script if you are interested

 

In addition , there is a better idea , but depending how many prims you own in the sim , and only if you have more that  one worker script 

Dont make a registry with one prim , but make a registry with a 255-prims, each child having a llremoteloadscriptpin script  . You set your "workers" scripts  inside  this "registry" object  in the state disabled  ( important , because if you don t set it , the whole solution is totally useless ) 

Indeed , llremoteoadscriptpin can load from one object to an another objet , and not only the self-object

In clear , for instance the prim number 4 inside the regustry object can load in the prim 4 ( or else ) in your targetted object 

In this case , if you can afford it , you will load with only one delay  (ne step ) , because the 255 prims of the "regustry object diffuse in parallel 1 script by prim inside your 255 prims  target object

Nevertheless , your "registry object" need, , before to diffuse the "workers scripts" in your 255-prim targetted object ,  to inspect or to communicate initially   with your targetted object and to collect all the keys of the child prims of the targetted object 

 

So , the whole process will run  probaby 3-6 seconds  :

an example of workflow :

1 ) the root prim of the "registry" object sends by llremoteloadscript  to the main root f the targetted object , not your worker script , but an initial script who collects all the keys of the child prim 

2 ) the script inside the root prim of the targetted object answers and gives the list of keys of its childs

3) each prim from the "registry object" sends one "worker" script  to each prim of teh targettd object

4) repeat 3 if you have several "workers " script 

5) deletes the script given in step 2

=>  time  : two delays

Edited by Miranda Umino
  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...