Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Suggestions please - timed object replacement

Lewis Nerd
Nerd by name and nature!
Join date: 9 Oct 2005
Posts: 3,431
12-04-2005 00:31
I need a timed script that will take four items from my inventory and switch them around in pairs at a timer. One has an animated script on it, the other doesnt.

This is all part of a 'light show' for my 70's themed nightclub I'm building.... I have made a mirror ball (7 prims, 2 textures, 1 script) which looks great but having it on permanently would be a bit too much.

So my plan was to have some spotlights, which would be on when the mirror ball was 'off', if that makes sense?

1) Place MIRROR_BALL_ON at x,y,z and SPOTLIGHTS_OFF at x1,y1,z1
2) Pause for set time
3) Remove MIRROR_BALL_ON from x,y,z and SPOTLIGHTS_OFF at x1,y1,z1
4) Place MIRROR_BALL_OFF at x,y,z and SPOTLIGHTS_ON at x1,y1,z1
5) Pause for set time
6) Remove MIRROR_BALL_OFF from x,y,z and SPOTLIGHTS_ON from x1,y1,z1
7) Repeat

Thanks in advance for any help. I've attached a picture of the dance floor in an earlier stage just for information.

Lewis
SiRiS Asturias
Chaotic Coder
Join date: 27 Sep 2005
Posts: 93
Options...
12-04-2005 01:44
Many ways you can go about what you want to accomplish.

1. If you don't want a prim to be visible while it is OFF:
Put a copy of one in the other & vice-versa, having one rez the other for a timed period, then it in turn rezzes the other for a period of time. Each time that change happens, the on that rezzed the other dies, essentially saving prim space & no visual trace of the non-operating prim.
Varients of this can be to change the opacity instead of using a llDIE(), using Temp On Rez objects if 30 seconds is enough time per switch.

2. Stationary, linked method if within 10M limit:
Link em' all together & use link msgs to turn certain things on n' off using a llSleep(); based timer to save on Sim strain, instead of the timer event & commands.

There're tons of different ways to do the same thing. Each person will offer their way of coding based on their style and knowledge. I personally try to stay to as few opcodes being called as possible, short structured code, minimal amount of scripts possible, 0 listens or timers, anything to Sim intensive.

I am not a LSL guru by any means, nor will I ever proclaim to be, unless in jest. What I will do, is say how I might go about a certain situation, in hopes to give you more options to choose a path from, while being "Sim friendly" keeping overall "Lag" as low as possible. I think the more the advanced people help the underlings to code better, Sim efficient code, the grid would be a better place.
LoL (Typical world peace type of suggestion! Bleh! haha)

GL :)
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
12-04-2005 09:33
timers if not in excess and controled well arnt that horrid llSleep totally stops the script for x seconds, which might be fine for lightshows i dunno but definatly use 1 central script if possible and some "serveo" scripts

if your covering out of link size areas link them into bundles, then you would have lets say 4 listens instead of 20, use obscure chat channels and have it look for the name of the sending object, filtering listens helps reduce their impact too.

/54/7a/74318/1.html
Ethan Cinquetti
Registered User
Join date: 5 Jul 2005
Posts: 24
12-04-2005 10:02
Hello, Lewis!

If you're planning to actually kill the ball and lights and replace them with switched-off versions, you may hit a wrinkle...every time you rez a replacement, I think might have that beloved gray-box-with-white-masking-tepe look for a split second while everyone's client gets the texturing instructions for some brand-new objects.

What about using a lightly-colored phantom cone for each of the lights, and just making them permanent fixtures? Then when you switch them off, you can apply a fully transparent texture to them. Since the lights are persistent, everyone's client should be able to switch them on and off instantly after a cycle or two, especially if you use transparent game colors for the lights, rather than uploading a texture for them.

And for the disco ball...just switch a particle system on and off? For a really cool effect, you could get your disco ball to retract into the ceiling when not in use.

Now, if you'll excuse me, I have to go dig through my MP3's...It's a pretty Sunday morning, and I just realized it's been way too long since I heard Gloria Gaynor :-p

Looking forward to your opening (if it's a public club)!

*disco ducks off to practice The Hustle in front of a mirror*

- Ethan
Lewis Nerd
Nerd by name and nature!
Join date: 9 Oct 2005
Posts: 3,431
12-04-2005 10:39
Probably the easiest way to explain this is for you to come have a look and see what i mean.... the glitter ball isn't a dreaded particle, its actually clear prims with light rays set at about 90% transparent, all linked to the mirror ball and a simple rotate script.

With some well timed turn on/off scripts I reckon I could make a good lightshow.... something different.

Hope to catch up with you some time.

Lewis
_____________________
Second Life Stratics - your new premier resource for all things Second Life. Free to join, sign up today!

Pocket Protector Projects - Rosieri 90,234,84 - building and landscaping services
Senuka Harbinger
A-Life, one bit at a time
Join date: 24 Oct 2005
Posts: 491
12-04-2005 12:04
From: Lewis Nerd
Probably the easiest way to explain this is for you to come have a look and see what i mean.... the glitter ball isn't a dreaded particle, its actually clear prims with light rays set at about 90% transparent, all linked to the mirror ball and a simple rotate script.

With some well timed turn on/off scripts I reckon I could make a good lightshow.... something different.

Hope to catch up with you some time.

Lewis


probably the best way to do this would be to have a "controller" with a timer loop that will send out messages to each of the things you want to turn on/off at the appropriate time, and the actual objects just go from their set parameters to 100% invisible when off using llSetAlpha, and setting it all back to normal alpha levels when the "on" signal is given. it'd be fairly easy to code as I have some flapping wings that rely on this timed sequence of turning on/off
Lewis Nerd
Nerd by name and nature!
Join date: 9 Oct 2005
Posts: 3,431
12-05-2005 04:43
Im not entirely sure how to even begin this.... anyone feeling generous enough to share something I can work from?

I seem to be ok in modifying existing scripts - but so far creating from scratch just gives me a migrane.

Lewis
_____________________
Second Life Stratics - your new premier resource for all things Second Life. Free to join, sign up today!

Pocket Protector Projects - Rosieri 90,234,84 - building and landscaping services
Senuka Harbinger
A-Life, one bit at a time
Join date: 24 Oct 2005
Posts: 491
12-05-2005 06:33
From: Lewis Nerd
Im not entirely sure how to even begin this.... anyone feeling generous enough to share something I can work from?

I seem to be ok in modifying existing scripts - but so far creating from scratch just gives me a migrane.

Lewis


I can drop you an examlpe script late tonight when I get back from work to show you what I mean by a controller with a timing loop, and the basic on/off script for what's being controlled
_____________________
My SLExchange shop

Typos are forgiven; desecrating the english language with reckless abandon and necrophilic acts is not.


The function is working perfectly fine. It's just not working the way you wanted it to work.
Kristivon Kolache
Registered User
Join date: 20 Oct 2005
Posts: 19
12-06-2005 10:56
This is my quest as well, but much more like the wings, where I need 4 legs to appear to change positions. Would you please share this example with me as well? I have so very much to learn before I could hope to come up with one otherwise! Nor do I Know where to buy such things, or what they are worth!!
Please?