Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

need help with object script!

Koh Costello
Registered User
Join date: 7 Apr 2005
Posts: 14
04-08-2005 03:55
Okie this is kind of a two parter
I created an object, that is basically a disk with prongs on it sticking out. I animated it to spin, and put a particle effect on it, yay!

so here we go,
1.) I attached the object to my arm, expecting it to spin, because I have been in game for two days thus far....but the animation didn't inherit. Is there a way to have to object spin on my arm as it does when it's on the ground?

2.) I may have to meet in game with a scripter for this one...I would like to eventually throw this thing off into the distance as it spins, and have it return to me. I don't really want to guide it or anything [yet], just toss and return. not sure where to begin on that one so...any help would be greatly appreciated, and might result in free custom animations =D.

sincerely,
Koh Costello
Cross Lament
Loose-brained Vixen
Join date: 20 Mar 2004
Posts: 1,115
04-08-2005 04:12
Welcome to SL, Koh. :D

1) Unfortunately, scripted physical rotations (plus llTargetOmega) don't continue to work on attached objects. That drove me nuts for a week, too, when I first came here, trying to get a planet to orbit around my head. :D

Currently, the only way I know of to 'animate' an attachment in that way is to use alpha transparency trickery... basically create multiple 'animation frame' copies of the moving parts, and make them turn visible and invisible in sequence, creating the illusion of motion. Or in some cases, texture animation.

2) This sounds pretty straightforward, up to a point. You're basically creating a standard 'gun' object there... only in this case, you're rezzing another copy of the object as the bullet. As for returning to the thrower, it would probably need to use a sensor to keep track of them... hmmm... *scratches head, then wanders off to think about this, muttering to herself* :)
_____________________
- Making everyone's day just a little more surreal -

Teeple Linden: "OK, where did the tentacled thing go while I was playing with my face?"
Zindorf Yossarian
Master of Disaster
Join date: 9 Mar 2004
Posts: 160
04-08-2005 05:19
You would have to make it a gun, which, when it shoots, turns transparent so you don't still have a disk in your hand after throwing one. If you want it to come straight back to where it came from, just set the velocity to the exact opposite of whatever it was going out. llSetForce(-1 * llGetVel()); or something like that. And make it have zero buoyancy. Then, when it detects a collision with you upon the return, it tells the gun in your hand to reappear, and deletes itself. That's the way I would see doing it.
_____________________
Badass Ninja Penguin: Killing stuff it doesn't like since sometime in May 2004.