Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Manipulating/Reading Avatar Size via LSL?

Ledneh Moreau
Registered User
Join date: 14 Jan 2005
Posts: 6
01-31-2006 16:28
I've been making a bunch of silly gimmick avatars that require making the default 'humanoid' avatar vanish. So far, my solution has been to play a meatball animation on the avatar, apply a Tiny Shape/Hair/etc. to the avatar, then place an invisiprim about it that just barely covers it (obviously I want the invisiprim as small as possible so as not to obstruct other people's view of transparency-enabled objects :)). I put the new avatar, the Tiny Shape adjustments, and the invisiprim (containing the meatball animation) in a folder, apply the folder, and it works. Well and good.

However, and call me picky if you like, I'd far rather keep it all contained within one object, rather than a folder with stuff in it out in the open. Perhaps it's the OO programmer in me going "revealing implementation details?! BAD PROGRAMMER, NO DONUT!", I dunno. ;)

So basically I want to set it all up so that it's all one self-contained object: the new avatar itself. When I attach the new avatar to me, I want it to:

1) Meatball me (easy), and either

2a) Resize an invisiprim (contained within the new avatar object) so that it just surrounds the meatballed avatar,

2b) Shrink the avatar to a minimal size via LSL (like what I currently do with Tiny Shape adjustments) and apply a static-size invisiprim, or

2c) Apply Shape adjustments contained within the new avatar object, and apply a static-size invisiprim.

(I've already tried resizing the invisiprim to fit the avatar's bounding box and/or height (no dice).)

So my question is, are any of 2a, 2b, and 2c doable? If so, how? Which would be easiest? Or, in the worst case that NONE of the above can be done, is there anything I can do to set all this up as one object instead of a folder with a bunch of avatar shape adjustments in it?

Thanks, and feel free to ask me to clarify if I confused anyone. :)
Angela Vega
Registered User
Join date: 20 Jan 2006
Posts: 3
02-01-2006 13:42
I've been told that it's not possible to fart around with av size via scripting, but I haven't tested this.

If it /is/ possible, though, this gives me some ideas...
Jamie Marlin
Ought to be working....
Join date: 13 May 2005
Posts: 43
02-01-2006 14:38
Ledneh -

As of right now, 2b and 2c are all impossible. There is no way in LSL to change an avatars shape, hair, eyes, skin, or clothing. I believe that this is intentional (without ever talking to a Linden about it), since 15 minutes after the capability was released somebody would implement a 'Naked' gun. Personally, I wanna see a gun that turns everybody it targets into an Elvis impersonator, but that is just me.

Unfortunately, the bounding box function doesn't give you what you need either. According to the wiki, it will give you base avatar height, but width and thickness are always the 'default' values. Also, this function does not know what animations are playing - it assumes that you are standing normally.

You can do part of what you want. You can hide your meatball animation inside the invisiprim along with a script that plays it automatically when the invisiprim is attached. You can even resize the invisiprim under script control if you want, with some sort of user controlled method of adjusting the size. Then, your folder would contain the invisiprim and the tiny shape only. Only partial success, but an improvement I think.
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
02-01-2006 15:07
The only way to resize an av is with a shape object.

You can't script it.

So you can't get rid of the folder.
Ledneh Moreau
Registered User
Join date: 14 Jan 2005
Posts: 6
02-01-2006 23:02
From: Jamie Marlin
Ledneh -

As of right now, 2b and 2c are all impossible. There is no way in LSL to change an avatars shape, hair, eyes, skin, or clothing. I believe that this is intentional (without ever talking to a Linden about it), since 15 minutes after the capability was released somebody would implement a 'Naked' gun. Personally, I wanna see a gun that turns everybody it targets into an Elvis impersonator, but that is just me.

Unfortunately, the bounding box function doesn't give you what you need either. According to the wiki, it will give you base avatar height, but width and thickness are always the 'default' values. Also, this function does not know what animations are playing - it assumes that you are standing normally.

You can do part of what you want. You can hide your meatball animation inside the invisiprim along with a script that plays it automatically when the invisiprim is attached. You can even resize the invisiprim under script control if you want, with some sort of user controlled method of adjusting the size. Then, your folder would contain the invisiprim and the tiny shape only. Only partial success, but an improvement I think.
Yeah, that's basically where I stand right now. The folder for each custom avatar contains:

-Tiny Shape, Tiny Hair, etc--I think there's four of them, I can't get on to check
-The custom avatar itself
-The invisiprim, scripted to hit the meatball automagically

I guess I can't do what I want, though. A shame, the OO programmer in me is deeply offended by having implementation details exposed like this. Oh well, I'll live.

Thanks for the help!
_____________________