Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Riding on another Person

Kismet Muromachi
teh kizzurps
Join date: 27 Mar 2005
Posts: 24
06-05-2005 02:42
I got a questions.. Not sure how to do this... How do you make it so your character can wear a pose ball.. and another person can ride that ball.. for example.. you have a Horse AV with a saddle to ride on.. and someone else can ride on it..

But what i'm trying to do is..

I have a 2 gestures from pose balls... one where AV (A) has his arms behind him.. and AV (B) Rides on AV(A) piggyback.

Ok yeah it's a pose.. but maybe theres a way so I can walk while holding the other AV.

I have this script I was given called Ride on Someone 1.2.. It seems it allows them to take over My controls so they can move me... Which I guess is ok.. but I would like to retain control

CODE
// Sit on Someone 1.2
// Catherine Omega Heavy Industries

integer DEBUG = FALSE;

integer gChannel = 0; // what channel to listen on by default?
string gSitAnim = "sit_ground"; // what animation to use to sit?

string gCommand;
string gSubCommand;

default
{
state_entry()
{
llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION | PERMISSION_TAKE_CONTROLS);
llListen(gChannel,"",llGetOwner(),"");
}

run_time_permissions(integer perm)
{
llTakeControls(CONTROL_DOWN | CONTROL_FWD | CONTROL_UP | CONTROL_LEFT | CONTROL_RIGHT | CONTROL_BACK, TRUE, TRUE);
}

listen(integer channel, string name, key id, string m)
{
integer command_divide = llSubStringIndex(m," ");
gCommand = llToLower(llGetSubString(m, 0, command_divide - 1)); // grab the command
gSubCommand = llToLower(llGetSubString(m, command_divide + 1, llStringLength(m))); // grab the rest of the input

if (gCommand == "/sit" || gCommand == "/stand")
{
if(DEBUG)llSay(0,gSubCommand);
llSensor("","",AGENT,20,2*PI);
}
}

sensor(integer num)
{
integer i;
for (i = 0; i < num; i++)
{
if (llSubStringIndex(llToLower(llDetectedName(i)),gSubCommand) > -1)
{
if(DEBUG)llSay(0,"sitting on " + llDetectedName(i));
llMoveToTarget(llDetectedPos(i) + <0,0,3>, 0.2);
llSleep(1.0);
llStopMoveToTarget();

if (gCommand == "/sit")
{
llStartAnimation(gSitAnim);
}
//return;
}
}
}

control(key name, integer levels, integer edges)
{
if ((edges & CONTROL_RIGHT) || (edges & CONTROL_LEFT))
{
if(DEBUG)llSay(0,"got here");
llStopAnimation(gSitAnim);
}
}
}



Not quite sure how to use it.. but as I started to think about doing this a little further.. I thought of a better way I could do this..

I have this Red Wagon Where a there is Pose Cube, and 3 Pose balls... The cube is the AV who pulls the wagon.. basically in control.. and the 3 pose balls are for sitting. So obviously the Pose Cube guy pulls the wagon and moves the other guys.

So I thought what if I made 2 Pose cubes that would hide as soon as i Wear them.. where I would be the person in control.. and the 2nd cube my girl would wear so she could piggy back on me.. basically the same concept as the wagon ie, I'm the Pose Cube in control on the wagon, and she's the pose ball on the wagon.

Does anyone have an idea how to do this?

Thanks.
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
06-05-2005 05:45
As a cursory look, you should just switch who the controls are being taken from in each object. You might want to swap the listener in state_entry as well.

Just replace this line:
CODE
llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION | PERMISSION_TAKE_CONTROLS);


... with the similar line of code in the other poseball, and vice versa.

Can you post the code from the other script in the object?
_____________________
---
Kismet Muromachi
teh kizzurps
Join date: 27 Mar 2005
Posts: 24
06-05-2005 18:58
Unfortunately, I cant get ahold of the guy that made the pose ball... with the animation and script.. The script in the pose balls are no mod no copy.. but i could take out the pose animations themselves out... could i use a generalized sit script


Btw.. I have no scripting experience lol.. but i'm trying.. and even though this is a hard first project, I'll keep pressin on heh.



In the wagon there is 2 scripts

Ani pos script 4.1 w/o hide - Mark Rebus
Wagon Script 2.0 - By Cory Linden

I tried contacting Mark about his script, but no answer yet.. and I'm just waiting for Cory Linden to come online.. if he ever does anymore to get that script.

Anyway.. ugh sorry this reply I made didn't help at all.
Zindorf Yossarian
Master of Disaster
Join date: 9 Mar 2004
Posts: 160
06-08-2005 08:58
My guess would be that the rider sits on something that follows the carrier around. And by follows, I mean moves to a point inside the carrier, so that the rider looks to be riding. Not a brilliant solution, but it would work pretty well.
_____________________
Badass Ninja Penguin: Killing stuff it doesn't like since sometime in May 2004.