|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
08-26-2006 08:58
I am sloooowly getting better at scripting (pat on back). I am up at the noobie level now. heehee. But this also means I have more scripted objects on my parcel. It seems a waste to leave scripts running all the time. So which of the following would be better for simulator resources: 1)Leave the scripts running all the time. 2)Build listeners into the scripts to sense my presence and turn on. 3)Make each object touch on/off to activate the script. 4)Create one object touch activated that will turn on all the scripts 5)Create one object that listens for my presence and will turn on all the scripts 6)None of the above. Alternative suggestion. 7)OMG Jesse is a dumbass for even asking questions like these and wasting the forum resources  A related question is on Objects. I don't care about my build if I am not in the sim. Is it better to do one of the above with objects? Leave them rezzed all the time or derez them if I am not there? If it would be better to derez them then that would open some new possiblities for this 512 land owner. I could then create a garden at ground level using a hundred or so prims to enjoy but then if I went up to to my build in the sky the garden would derez and my house would appear.
|
|
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
08-26-2006 11:39
Hmmm, it's not a stupid set of questions, but it is awkward to answer.
The answer to them all is - it all depends.
There are things like fast sensor repeats, open listens on channel 0 (well any listens on channel 0 and basically any open listen) that you want to turn off ideally.
Touch events are good for that. Touch to jump into the "off" state, touch from there to go back active. In fact it's a good rule of thumb for your switches in general, use whatever is appropriate to get out, but a simple touch is almost certainly the easiest way to get back.
Scripts in SL, unless you actually set them not running, are always "active" - the trick is to make them minimally active, a single touch_start() event is probably the way to go for that.
Timers that ping the dataserver to see if you're online are OK... but again not too fast, not too many.... that just adds load all round.
Quite a lot of things aren't all that active... pose balls for example don't really do anything until someone sits on them. They do munch a little bit of sim time, but then so will the touch_start to set the state back to active...
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
08-26-2006 12:32
Your poor little scripts. They didn't do anything wrong! Don't hurt them!  Anyway, if you really want to send things into a sleep state, you might have ONE object coordinate by accepting a touch event, running an INFREQUENT (every 5 seconds or so perhaps...) sensor, or detecting a collision. Then have the others listen on a large negative channel for the central object to tell them to go active/inactive. It could cut down lag a bit, and will probably be nicer from a UI perspective. From: Jesse Barnett A related question is on Objects. I don't care about my build if I am not in the sim. Is it better to do one of the above with objects? Leave them rezzed all the time or derez them if I am not there? If it would be better to derez them then that would open some new possiblities for this 512 land owner. I could then create a garden at ground level using a hundred or so prims to enjoy but then if I went up to to my build in the sky the garden would derez and my house would appear. That's actually a pretty cool idea. Just have one prim in each place that can rez your whole scene on demand. Go for it!
|