Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

AO and Props?

Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
11-05-2008 17:23
i'm just wondering if anyone has ever made an ao that rezzes props for a specific animation? to where it would either actually rez the object at a specific offset of the avatar, or tell another attachment to hide/show accordingly. i would want tit work with the zhao since it does the random stands, but i would only want the attachment to be visible if it's playing the right animation
_____________________
Dark Heart Emporium

http://www.xstreetsl.com/modules.php?name=Marketplace&MerchantID=133020

want more layers for tattoos, specifically for the head? vote here
http://jira.secondlife.com/browse/VWR-1449?

llDetectedCollision* Functions similar to touch
http://jira.secondlife.com/browse/SVC-3369
Pedro McMillan
SLOODLE Developer
Join date: 28 Jul 2007
Posts: 231
11-05-2008 17:31
I think rezzing something from an AO would be pushing it a little, but I've certainly seen many systems which make an attachement appear for the duration of the animation. For example, folks with a typing animation override, whose avatar pulls out a paper and pen to start 'writing', instead of doing the usual typing animation.

The objects would need to be permanently attached to the avatar (e.g. at the hands or whatever), but with alpha set to 0.0. When the AO kicks in, set the alpha up to 1.0, and then set it back to 0.0 when the animation stops.
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
11-05-2008 17:40
lol, i didn't even think about that, but that's what i meant about it showing/hiding. what it is really, is one of the stands i'd like to use is holding a cane, but the other stands i'm using would look silly with the cane. i wouldn't want to add an extra timer to the outfit just for 1 prop to check if the avatar is playing a certain animation. or would the listen be more imposing?
_____________________
Dark Heart Emporium

http://www.xstreetsl.com/modules.php?name=Marketplace&MerchantID=133020

want more layers for tattoos, specifically for the head? vote here
http://jira.secondlife.com/browse/VWR-1449?

llDetectedCollision* Functions similar to touch
http://jira.secondlife.com/browse/SVC-3369
Pedro McMillan
SLOODLE Developer
Join date: 28 Jul 2007
Posts: 231
11-06-2008 03:05
Do you have access to the original AO script? If so, you could add the call to show/hide the prop in the at the appropriate start animation call. Otherwise, you might have to just add another timer.
Monica Balut
Beam-Me
Join date: 18 Feb 2007
Posts: 311
11-06-2008 05:03
I used Huddles EZ Animator for that once. You can use it to rez things at a specific offset to the avatar. It wasn't perfect tho. I had to write a helper script to keep the object oriented correctly with respect to my avatar. It worked great. I rezzed a chair at the end of the runway in a fashion show and sat on it. I scripted the chair to die shortly after I got up from it and went on my way to the next runway stop. But, the EZ Animator has all the elements you need to rez things from the AO.
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
11-06-2008 05:27
From: Pedro McMillan
Do you have access to the original AO script? If so, you could add the call to show/hide the prop in the at the appropriate start animation call. Otherwise, you might have to just add another timer.


yeah it's zhao II, so it's open source. i've looked into it, and have an idea where to add the call, i just haven't tried it yet
_____________________
Dark Heart Emporium

http://www.xstreetsl.com/modules.php?name=Marketplace&MerchantID=133020

want more layers for tattoos, specifically for the head? vote here
http://jira.secondlife.com/browse/VWR-1449?

llDetectedCollision* Functions similar to touch
http://jira.secondlife.com/browse/SVC-3369
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
11-06-2008 08:26
make sure you generalize the call, like a say that reports the current animation name, this way you can just listen for specific animation names from your owned AO, and use that info in any number of other items, such as wings that appear when you fly, accesories that change position for different poses/walks, etc ad nauseam. I'd reccomend against using the general state (like standing 1) since animations can be changed, and may break the behavior of items if they are (new position is off for this pose, etc etc)
_____________________
|
| . "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...
| -
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
11-06-2008 08:46
yeah, i was probably gonna use an if statement after triggering the animation. IE

if (curranim == "old man walk";)
llSay(-45, "cane show" );
else
llSay(-45, "cane hide";);

i don't think that would hurt the ao, since all it is doing is checking the name of the alread triggered anim. i'll give both methods a try later. yours sounds like it would be better though because that would make it more flexible to work with multiple props and reduce the memory usage. another question. the zhao reports free memory according to the lsl limit right? what # would i need to change it to for mono?
_____________________
Dark Heart Emporium

http://www.xstreetsl.com/modules.php?name=Marketplace&MerchantID=133020

want more layers for tattoos, specifically for the head? vote here
http://jira.secondlife.com/browse/VWR-1449?

llDetectedCollision* Functions similar to touch
http://jira.secondlife.com/browse/SVC-3369
Very Keynes
LSL is a Virus
Join date: 6 May 2006
Posts: 484
11-06-2008 08:51
From: Ruthven Willenov
the zhao reports free memory according to the lsl limit right? what # would i need to change it to for mono?

In theory you should not have to change anything, as in mono the function is as bad as it was before, I shows only the high water mark. so if you are currently raising an alarm at 2KB free in will continue to do so. It should just take a lot longer to reach that situation.
Viktoria Dovgal
Join date: 29 Jul 2007
Posts: 3,593
11-06-2008 09:15
Just drop the percentage thing and print the llGetFreeMemory() value instead. It does the job, and won't break if they twiddle with memory limits again in the future.
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
11-06-2008 13:24
Yeah, the free memory thing is a known broken feature under MONO. Known to me anyway :) I haven't played with MONO enough yet to feel comfortable with out an 'official' update, and that's so easy to find and change in the script anyway, as Viktoria says.

if (curranim == "old man walk";)
llSay(-45, "cane show" );
else
llSay(-45, "cane hide";);

Go with Void's suggestion - llSay(someChannel, animName). Then the cane can know what to do with that info, instead of the AO having to know that this anim is tied to a cane. The cost is that the AO will be chattering away with every animation change, but it's a better / more generally usable change. Your way would work for a personal tweak, but I'd go with Void's idea if you ever decide to release your own ZHAO mod :)
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
11-06-2008 15:50
ooh, a repsonse from THE ziggy :-) /me giggles. anyways, it's not necessarily the ao i'm wanting to create. just an ao that works with the avatar i'm selling it with. but yeah, i would definately just have it say the anim name on a specific channel that the props listen to. that way there's no interferance if the user does decide to use the ao for something else. and i would have a scripted and non scripted version of the attchments if they don't want certain ones to disappear. i guess in that case, i could even use it for an invisible attachment that would rez a specific object, like the chair in monica's response.
_____________________
Dark Heart Emporium

http://www.xstreetsl.com/modules.php?name=Marketplace&MerchantID=133020

want more layers for tattoos, specifically for the head? vote here
http://jira.secondlife.com/browse/VWR-1449?

llDetectedCollision* Functions similar to touch
http://jira.secondlife.com/browse/SVC-3369
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
11-09-2008 18:12
Well, doesn't hurt to use some kind of consistent interface, because if tomorrow someone comes to you and says "Hey I'd like to sell this prop for your av", you're all set. I like the idea of using a negative channel like you picked. You could pick a larger number to minimize the chance of clashing with some other device. You could also identify your message by saying something like "AO-ANIM|old man walk"... that way even if something else is using your channel, the prop will know how to filter out messages that it isn't supposed to respond to.

How elaborate you want to get is up to you :) But if you spend some time thinking about a good interface now, it'll be easier to extend it for additional behavior in the future without having to go back and change some code that you've already written, or worrying about compatibility issues with old props / new avs or vice versa, and so on.
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
11-09-2008 21:18
yeah, the props would be custom to the ao, so in the listen event i would make sure it would only listen for the name of the ao. and the channel i mention was just an example. and the old man walk actually was just an example too. i figured mentioning using a cane would be an easier way to explain it
_____________________
Dark Heart Emporium

http://www.xstreetsl.com/modules.php?name=Marketplace&MerchantID=133020

want more layers for tattoos, specifically for the head? vote here
http://jira.secondlife.com/browse/VWR-1449?

llDetectedCollision* Functions similar to touch
http://jira.secondlife.com/browse/SVC-3369
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
11-10-2008 07:31
actually you can get away with having it listen to just the AO, and test that the AO is owned by the same person, that'll prevent any issues with other AO's using a similar setup on the same channel
_____________________
|
| . "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...
| -
Perry Windlow
Registered User
Join date: 7 Oct 2008
Posts: 17
11-10-2008 13:16
From: Ziggy Puff
Yeah, the free memory thing is a known broken feature under MONO. Known to me anyway :)


It is ?
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
11-10-2008 13:40
If you recompile your script to MONO, the free memory reported by the script will be wrong.
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
11-10-2008 20:06
yep, this is why i was asking what number to change it to in the script. it's telling me something like 126% free memory lol
_____________________
Dark Heart Emporium

http://www.xstreetsl.com/modules.php?name=Marketplace&MerchantID=133020

want more layers for tattoos, specifically for the head? vote here
http://jira.secondlife.com/browse/VWR-1449?

llDetectedCollision* Functions similar to touch
http://jira.secondlife.com/browse/SVC-3369
Viktoria Dovgal
Join date: 29 Jul 2007
Posts: 3,593
11-10-2008 20:52
From: Ruthven Willenov
yep, this is why i was asking what number to change it to in the script. it's telling me something like 126% free memory lol

A little more on why I said it would be good to just print out the number and forget dividing by 64K or whatever. In the future, scripts are going to be able to request blocks of memory. If would be nice if they keep the Mono default at 64K for compatibility, but LL has a way of surprising us with strange decisions.

The memory change was a "maybe someday" kind of possibility right up until the void sim fiasco, now it's become one of those features we can expect to be sprung on us fairly soon. So don't assume anything about memory for now :o
Crystal Falcon
Registered Silly User
Join date: 9 Aug 2006
Posts: 631
11-10-2008 22:11
Wouldn't it be easier to simply have the prop's script check if that anim is currently playing on the av? ;) That way it would work with any AO or even playing the anim directly and not need to figure anything out in the AO...
_____________________
TP to Crystal's Facets in world:
http://slurl.com/secondlife/Kress/120/5/146/

Shop my natural AO poses, clothing, tools with XStreet:
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
11-11-2008 04:01
From: Crystal Falcon
Wouldn't it be easier to simply have the prop's script check if that anim is currently playing on the av? ;) That way it would work with any AO or even playing the anim directly and not need to figure anything out in the AO...

You would then have to set it up on a timer and continually hammer the sim with just one more barrage of queries as opposed to just patiently waiting for a message.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
11-11-2008 05:36
From: Jesse Barnett
From: Crystal Falcon
Wouldn't it be easier to simply have the prop's script check if that anim is currently playing on the av? ;) That way it would work with any AO or even playing the anim directly and not need to figure anything out in the AO...

You would then have to set it up on a timer and continually hammer the sim with just one more barrage of queries as opposed to just patiently waiting for a message.


exactly, i didn't want to add an extra timer. and since it's an ao custom for an outfit and it has multiple stands that play randomly, simply having the actual prop play the anim is out of the question
_____________________
Dark Heart Emporium

http://www.xstreetsl.com/modules.php?name=Marketplace&MerchantID=133020

want more layers for tattoos, specifically for the head? vote here
http://jira.secondlife.com/browse/VWR-1449?

llDetectedCollision* Functions similar to touch
http://jira.secondlife.com/browse/SVC-3369