Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Another boat script question.. or two

Carbon Philter
Registered User
Join date: 4 Apr 2008
Posts: 165
06-12-2009 16:05
Hi.

I'm trying to refine a boat set-up based on a script I found - http://www.heatonresearch.com/articles/188/page3.html, which works quite well, at least I think so from a position of little detail scripting knowledge.

However, trying to cut down on my usual learning process of laborious trial and error, I would appreciate a little advice.

1) Every time I hit a sim border I get a blue dialogue box asking permission to animate my avatar. Is there a way to supress this dialogue? ANything in particular I should look for in the script? I don't want to bog the post down with the full scipt but can do so if anyone needs it to assist pointing me at the appropriate line/lines.

2) I've put in a particles script to generate wake from the outboard and bow using a controller script by Jopsy Pendragon I picked up at the Particle Lab:

//// "Seated Avatar v2" CONTROLLER TEMPLATE v1 - by Jopsy Pendragon - 4/8/2008
//// You are free to use this script as you please, so long as you include this line:
//** The original 'free' version of this script came from THE PARTICLE LABORATORY. **//

// EFFECT: Particles are turned on when an avatar sits on this prim, and turned off when
// they stand up.

// WARNING: llSitTarget (included below) seems to be required for this script to work.

// SETUP: Drop this CONTROLLER TEMPLATE script into the same object with
// your PARTICLE TEMPLATE. It should be operational immediately.


// Adjust these values:

string CONTROLLER_ID = "A"; // see more about CONTROL TEMPLATES at end.

integer occupied=TRUE; // assume someone is sitting on us if the script resets.

default {
state_entry() {
// You may have to adjust SitTarget location/rotation or the location of this prim.
llSitTarget( <0.25, 0.0, 0.55>, ZERO_ROTATION);
llSetClickAction( CLICK_ACTION_SIT );
}

changed(integer change) {

if ( change & CHANGED_LINK ) { // a link change has occured

if ( llAvatarOnSitTarget() != NULL_KEY ) { // our seat has an avatar in it!
llMessageLinked( LINK_SET, TRUE, CONTROLLER_ID, NULL_KEY ); // send ON command
occupied=TRUE;

} else if ( occupied ) { // only turn particles off if someone was sitting and now isn't.
llMessageLinked( LINK_SET, FALSE, CONTROLLER_ID, NULL_KEY ); // send OFF command
occupied=FALSE;

}
}
}
}


I'd like to amend a separate controller so that the bow wake only generates when the boat is moving, which I think involves incorporating 'moving_start', and presumably 'moving_end'.
I suspect I can take out the avatar sit sensor event - the driver has to be present before the boat will move in any case - but I'm not sure about how to substitute the moving_start script from the Wiki. Can I just paste the whole thing in after remming out the sit sensor?

Apologies if this is long but it's my way of learning the intricacies of scripting - from scratch!

Thanks for any help/advice

Carbon
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
06-13-2009 01:57
q1:
you'll need to check the main script, it possibly has a changed event triggering on CHANGED_REGION that is rerequesting animation permissions (which is odd if you're still seated, unless it's unsitting you at the border...)

q2:
your guess is absolutely right, you need to move the on/off to the moving start/stop events and you should be good to go.
_____________________
|
| . "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...
| -