Friday, August 1, 2014
Night before last, Sweetie pulled a cute little clockwork bird from her inventory. I tried to fly it, but it was set to allow only its owner to ride. Then I saw it was full perm from Aley Resident, and I immediately took a copy.
The birdy flies wonderfully, but wouldn't go below the surface of the ocean, which disappointed Sweetie-- so after she went to bed I decided I would tweak the script to allow anyone to ride, tweak it again to allow anyone to ride, and put it in a rezzer so visitors could ride it.
Wait a second! There was a flaw in the plan. I didn't HAVE a rezzer-- at least not one that would continuously temporary objects.
And so I decided to build one. How hard could it be?
It turned out not to be difficult, but it was tricky.
I did the modifications to the script, added a timer to make the bird whisper on a high number channel "birdie here" ever second or so, set a copy to temp-on-rez, and put the temporary birdie in a prim.
I created a script in the prim and set it to rez a bird whenever the script started and again when it stopped hearing from the birdie it had rezzed-- meaning it had timed out and disappeared or someone had jumped on it and flown away. So long as it kept hearing from the birdie that it was present it would refrain from rezzing a new one.
But Doh! As written, the script wouldn't rez a birdy so long as it kept hearing "birdie is here"-- but wouldn't rez a new bird when the original bird disappeared.
That was because the listen event wouldn't be triggered.
I thought about replacing the listen with sensor repeat (which would work much the same, except by detecting the presence of the bird rather than listening to what it was saying, and would have the same problem when the birdy disappeared), but it was late at night and I was tired and my head started to swim, so I took the lazy way out. I made a new prim, linked it to the first, and had IT tell the original prim when it stopped hearing from the birdie.
It worked like a charm.
You can go here to ride the birdie and get a copy for yourself.
Here's the birdie as rezzed.
In this photo I've turned on Highlight Transparent so the rezzer is visible. The bird's unfolded wings are visible also.
Posted by Cheyenne Palisades at 3:39 PM