#How to make a jump sound and double jump sound in 4x?

1 messages · Page 1 of 1 (latest)

warm knot
#

How to make a jump sound and double jump sound??

severe quarry
#

The first sfx it on the second jump and the second sfx is for the first jump

warm knot
#

Oooh

#

But what if we spam button?

severe quarry
#

It should work anyway

#

Try it

warm knot
#

Ok

warm knot
#

There is a delay.

severe quarry
warm knot
#

And if you spam it, it keeps ringing multiple times.

severe quarry
#

Oh right i didn't think about that

#

I'm going to fix the code

#

Add this component to the main actor with the variable in the image

#

This is the "when object is created" script of the component

#

And this is the jump button (when tapped, not when released) script

warm knot
#

How to make the component?

severe quarry
#

Then make the variable with "+attribute"

#

It's a true/false variable

warm knot
#

Like this?

severe quarry
#

Yes. But in the settings of the variable, put false as initial value

#

And if it doesn't update make it manually as false

warm knot
#

Like this?

severe quarry
#

Yes

warm knot
#

Its working but its has a delay

#

Forget it, it was my headset

#

Wait, there's still a problem

#

When I start the map or die, the sound doesn't work.

severe quarry
#

What do you mean by "start the map"

warm knot
#

When I enter the map, like, I exit the editor and enter...

#

By the way, if I stand leaning against a wall, the sound plays repeatedly when spamming.

severe quarry
#

It doesn't for me

#

Can i see what you put in the jump button script

warm knot
severe quarry
#

You didn't add the sfx for the double jump, it has to be below the "set true/false1=true" block. Both of the sfx blocks must not be orange

#

To make them blue, click on that curved arrow on the left of the blocks

warm knot
#

I dont want the double jump sound for now

severe quarry
#

The just change that thing on the sfx block

#

Now i have to go

warm knot
#

Even when I add the blue SFX, it's still muted for the first few seconds.

warm knot
severe quarry