Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Needing a pet script.

Judy Brodie
Divinational Sweetie
Join date: 20 Apr 2004
Posts: 138
04-04-2005 16:00
I have a r2-d2 and I need a pet script that will let it follow. Only scripts I can find are for flying pets. Anybody got any idea what I can do?
Talila Liu
Micro Builder
Join date: 29 Jan 2004
Posts: 132
04-04-2005 16:57
Make your R2D2 "fly" really low to the ground? Not exactly sure how to do this, I havent really experimented with followingobjects all that much.
Frans Charming
You only need one Frans
Join date: 28 Jan 2005
Posts: 1,847
04-04-2005 17:01
Doesn't R2D2 have rockets? :P
Talila Liu
Micro Builder
Join date: 29 Jan 2004
Posts: 132
04-04-2005 17:10
I think He does, but I doubt he has enough feul inside his lil body to haver for an extended period of time.
Lightwave Valkyrie
Registered User
Join date: 30 Jan 2004
Posts: 666
04-04-2005 17:58
use the script from 'kuy' or the 'horse'
you can find them everywhere:)
they have follow
-LW
Jim Herbst
Registered User
Join date: 22 Feb 2005
Posts: 67
04-04-2005 22:17
only in the prequels he does, between the prequels and the original SW movies one of the many owners R2-D2 is with for a short time removes his boosters for some reason. (big SW fan, but not of the prequels)
Talena Wallaby
Registered User
Join date: 20 Mar 2005
Posts: 19
04-04-2005 23:06
From: Jim Herbst
only in the prequels he does, between the prequels and the original SW movies one of the many owners R2-D2 is with for a short time removes his boosters for some reason. (big SW fan, but not of the prequels)


Yea for continuity! Or, well, lack thereof.
Damanios Thetan
looking in
Join date: 6 Mar 2004
Posts: 992
04-05-2005 05:18
There actually aren't that many 'walkers' around. The method i use for my kittens & spiders is:

I use an llMoveToTarget(target) to set the movement.
In a a rather tight timer loop. I basically do this:

llStopMoveToTarget() --> the object starts dropping to the ground
llSleep(SOME_TIME); --> let it drop for a while
llMoveToTarget(target) --> start moving again

Next to that...i use a Z coord. corrector function once in a while. (Every 10 iters or so) This will make sure the targets Z coord is based on the current 'floor' (this is not the llGround() level! )
This is basically a while loop functions that keep the object falling, until the object no longer moves in the z direction (apparently it hit the floor level), and sets the z value accordingly.

It's crude, but it works... it will give a form of bumpy walk.
I tried several llPush'es and llSetForce's to get a more natural walk, but the end results aren't reliable in Havok 1. (Your pet will end up jumping fences and do weird stuff)

But i guess this way of movement would be more suitable for a C-3PO...


Oh...
for the R2D2... just look in a basic follower script for the llMoveToTarget(target) line...
Probably something like:

vector target = llDetectedPos(0);
llMoveToTarget(target + <1,1,1>;);

The <1,1,1> value is the offset from your avie. Basically the distance in meters using the x,y,z axis.
The trick is changing the <1,1,1> to move lower to the ground...
Probably something like <1,1,-1> could work, experiment with that value.
_____________________
Torley Linden
Enlightenment!
Join date: 15 Sep 2004
Posts: 16,530
04-05-2005 05:23
LOL, talk about Star Wars geeks!

I'd like to see this R2D2 inworld... :D
_____________________
Cid Jacobs
Theoretical Meteorologist
Join date: 18 Jul 2004
Posts: 4,304
04-05-2005 12:14
From: Torley Torgeson
LOL, talk about Star Wars geeks!

I'd like to see this R2D2 inworld... :D

I wonder if we could get a Torlop pet in world! :D
*waits for someone to stop to sell torlops in boxes*
_____________________
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
04-12-2005 13:51
Wouldn't it work well if you set up R2 as an autonomous vehicle, like a car, with auto-drive capabilites?

This would allow you to not worry about implementing pauses to allow physics to take effect.

Also, you could set it up to turn into a plane occasionally for "boosters", for when you fly up a cliff, etc.