Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Help building a collision activated preloading prim.

Atom Burma
Registered User
Join date: 30 May 2006
Posts: 685
11-24-2008 05:53
Hey,

I think this idea is sound, but not 100%, hopefully the LSL whizzes can verify this as an idea. K I made a huge indoor rollercoaster type of build, it's huge, about 80m x 60m and some 1500 prims. It's a series of indoor immersive enviornments, with animations sounds, particles, and all sorts of crazy scripted things, which believe it or not is not my question.

My largest complaint when testing this publically was that it took a second ride to enjoy this, because nothing loaded. So I am making a collission prim that will force load as much as I can, located in the middle of the ride kart loading area, I assume that just putting out a prim with the llPreload string is not really going to run, aside from the one time that I rez it. So this is a script I threw together, I am not posting it all because obviously it contains all my UUID's for my sounds, which would be a bit dumb on my part to just release publically. So here goes.

[CODE STARTS HERE]

default
{
state_entry()
{
llVolumeDetect(TRUE);
}

collision_start( integer num_detected )
{
llSetStatus(STATUS_PHANTOM, TRUE);
llPreloadSound("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";);
llPreloadSound("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";); }

on_rez(integer num)
{
llResetScript();
}

listen(integer number, string name, key id, string message)
{
}
}

[END CODE]

So there are about 25 sounds, all listed by UUID. So just a few questions, I know preloaders are unreliable by nature, but is this even a sound script? I also wondered since I used UUID's, do I need to include the actual WAV files in the prim at all, or is that enough with just the UUID. Also there is no llPreloadtexture command, is there a similar way to force textures to start to preload as well.

I have never made such a device, or such a monster of a build where one was required.

I just have an aversion to using a mass loading prim, I really am liking the collission activation, but is this the best way to do this, or do you need it to actually load to everyone around you? Just curious, I want to avoid lag as much as I can. And if somebody is not going to ride this, they surely don't need 25 sounds to be forced into their client, that seems pointless to me.
Dekka Raymaker
thinking very hard
Join date: 4 Feb 2007
Posts: 3,898
11-24-2008 06:30
What about making the ride last for two complete circuits, with a simple short notecard explaining why?
Atom Burma
Registered User
Join date: 30 May 2006
Posts: 685
11-24-2008 06:50
well this is largely for the lil guys, I threw up a survey machine to monitor customer complaints, and some,maybe 15% just complained, so maybe it is overkill on my part, I want to at least give it a try, but I realize that not everyone will always be happy
Dekka Raymaker
thinking very hard
Join date: 4 Feb 2007
Posts: 3,898
11-24-2008 07:16
From: Atom Burma
well this is largely for the lil guys, I threw up a survey machine to monitor customer complaints, and some,maybe 15% just complained, so maybe it is overkill on my part, I want to at least give it a try, but I realize that not everyone will always be happy

Only 15%, you should be happy. Personally I would ban that 15% LOL

…I wouldn't really :)
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
11-24-2008 12:10
you might preload based on the section you're in, say preload the next areas sounds in the current area? not sure how you're doing it, but you could also handle all the sounds from the cart rather than their areas, and just trigger them by location... should save a little rewriting.
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Atom Burma
Registered User
Join date: 30 May 2006
Posts: 685
11-24-2008 13:24
true, thanks for the ideas. what I meant by the 15% was that a percent of the general population just does not have either the CPU or the bandwidth, and yes, that is pretty inescapable
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
11-24-2008 13:40
The only way to get textures to load is to have them in the scene. Consider creating a board of all the textures that the user passes before entering the ride. Could make it something of a mosaic (and you don't have to show all of each texture, only a part).
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey