Jump to content

Triggering sounds when starting a jump and when landing.


Minareth Irata
 Share

You are about to reply to a thread that has been inactive for 2584 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hello, I'm fiddling with a nice walking sounds attachments that also plays different sounds when entering water, but one thing I can't seem to tackle is how to trigger sounds when starting a jump and once landing either after a jump or landing after a fall.

I tried it with a timer first and detecting the Animations, using an integer to check if it has already happened, but this doesn't work at all as I feared.

I also tried doing it based on taking controls, for the jumping at least. (Hoping to also add sound trigger for when crouching and exiting a crouching position, so eventually both up and down controls are needed, or animations triggers might also work.)

So, the event needs to be direct, not a timer I'd say, but then how to trigger it exclusively when starting a jump and when landing, and not triggering it when flying and pressing up? Anyone able to help me?

Link to comment
Share on other sites

Let's see.   The script can tell  in the control event, when you press Page Up (or E),so that should fire when you start your jump.

You could maybe start a fast timer as well as triggering a sound then, and then use llGetAgentInfo to detect when AGENT_IN_AIR is no longer the case,  or maybe try to trap when llGetAnimation returns "Landing". 

I think llGetAgentInfo is going to be the safest.

 
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2584 days.

Please take a moment to consider if this thread is worth bumping.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...