Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

New to Scripting, quick question.

Sae Luan
Hardcore 4the Headstrong
Join date: 6 Feb 2006
Posts: 841
08-14-2007 05:54
I was trying to make shoes that played sounds only as each foot struck the ground. I assumed I could do this with collisions (I'm new to scripting so forgive me)...but it would not work. Maybe I did something wrong or maybe it won't work at all? Can an attached object detect collisions?
_____________________
Rave Nation Owner
saeluan.blogspot.com
I accept most custom work. IM in world for details.
-
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
08-14-2007 08:15
Well, I would imagine also that you're generally colliding with the ground...which is a different type of collision (land_collision).

To be honest though, I have not tried making an attached object detect a collision and there is the very real possibility that it either:

a) Won't detect collisions

or

b) Will detect collisions anytime any part of the avatar is 'colliding' with anything (possibly even the attachments themselves)
_____________________
--AeonVox--

Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music.
Sae Luan
Hardcore 4the Headstrong
Join date: 6 Feb 2006
Posts: 841
08-14-2007 16:14
ok well thanks for answering :)
_____________________
Rave Nation Owner
saeluan.blogspot.com
I accept most custom work. IM in world for details.
-
Cross Lament
Loose-brained Vixen
Join date: 20 Mar 2004
Posts: 1,115
08-14-2007 23:48
The walking animation is just an 'illusion', so to speak. In terms of in-world physics, your feet aren't striking the ground, so land_collision functions aren't going to work for this; in fact, as long as your avatar is on the ground, they'll be generating continuous land_collision events.

What you'll likely want to do instead is detect when the avatar is walking, and if they are, then play a looping footstep sound crafted to roughly match their walking animation. So you'll want to check llGetAgentInfo() on a timer, or something like that. :)
_____________________
- 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?"
Simil Miles
Creator
Join date: 1 Mar 2007
Posts: 300
08-15-2007 06:50
Attachments are phantom and thus need to use llVolumeDetect
_____________________
UnConWTech @ Flo (144, 84, 224) http://unconwtech.free.fr

SL books http://astore.amazon.com/secondlife-sl-20/

Need a beta tester for quality assurance ?
Need a translator for English, French, Spanish ?
Sae Luan
Hardcore 4the Headstrong
Join date: 6 Feb 2006
Posts: 841
08-16-2007 06:34
thanks guys! :)
_____________________
Rave Nation Owner
saeluan.blogspot.com
I accept most custom work. IM in world for details.
-