PaparZD - run sound happens immediately, jump sound doesn't work, and character faces left

Hi,

I have been following the PaperZD documentation, I’ve followed it to Step 11 without issue(at least error wise) and I have the following issues.

  1. Running sound starts immediately on game start before I move my character, then when I move him it corrects itself to only sound when he is running.

  2. The jump sound I configured following the documentation doesn’t fire, at all.

  3. My character now always faces the left instead of the right when I move him for the first time.

Each animation for jump and run have their sounds configured to their flipbooks correctly, the issue is in the BP config somewhere, probably the player controller.

Player Controller BP

Animation BP

Locomotion

Jumping Node

Falling Node

Jumping to Falling Transition Rule

Falling to Run Transition Rule

Run Animation

Idle Animation

Hi @Promethean :slight_smile:

  1. With regards to the running sound playing on game start, it sounds like it could be a problem with your characters initial state. Inside your character BP, where you have set the Flipbook, what is the default flipbook that has been set there? Is it idle or some other one?
    image

  2. Is your jump animation playing at all? It looks like its not connected in the code

  3. You can simplify the move right and left as follows, makes it easier to read: (I used forward and back)


    You did mention that it starts right then changes left and is locked. Maybe print the value of “Is Moving Right” when you press the movement keys to check if its being updated correctly.

My first advice would be, switch completely to the Enhanced input and take advantage of the stuff you get from them :slight_smile: Makes it a lot easier to find out the direction (like with setting them to 2 axis instead of bool), you are walking in, and when your char is walking or not.

Then, since you use PaperZD, you should let set this all the flipbooks and animations, instead of setting just some in your animation bp and others in your character bp via those “Set Flipbook” nodes.

Third, in your last image for the Idle and Move Animations, you might have an error. You are checking your variable for wether your char moves left or right, but i guess, your char can face left or right during idle too. So you might want split that into two separate variables, one purely for direction (f.e. IsFacingRight), and another for moving or idling → f.e. IsMoving - does not matter in which direction, since you want switch between the idle and the moving animation.

1 Like

Okay I think moving in the direction of using Enhanced Input over a hybrid model is best case, despite the extra work. I think I’ve managed to set it up correctly. For movement in particular I’ve create the IA_Move which allows for pressing D or A assuming I can configure it so it can move left on A press and move right on D press, unless they need to be separated?

When trying to rejig the character controller bp to move, it is a very different look and I’m not sure how to connect it properly?

New config (doesn’t work because there is no Axis value on the node)

Old config

Yeah, it takes a little bit to get used to the new system, but he more you play with the Axis values, and the different outputs, the more you realize, just how helpful all that stuff is.

For your Movement input, you can go into your Input Action and switch it from "Digital (Bool) to 1 Axis or 2 Axis. F.E. 2 Axis gives you two float outputs, one for the X axis, and another one for the Y axis.

With those floats is is then really easy to figure out, in which direction you are walking, because they have a -1 to +1 range.

This here is my basic default setting for a multi-directional char (4 directions, so the char has flipbooks for up, down, left, right movements). You might not need that node to invert the Y axis, for me, it was necessary with my particular char, i guess, it depends on if you make a first person, third person or 2d sidescroller char, and where the camera is in relation to him ^.^

The animation blueprint uses this additional Directionality (Vector2D) variable to check, which diection is currently used.

For a tiny crashcourse about Enhanced Input, you might check this video here:

And the manual:

I still have an issue when trying to connect it, even after changing the IA_Move type it doesn’t have an X and Y value.

Also not sure where this Set Directionality variable is pulled from in your screenshot?

Had a look at this tutorial and now when I try to move with ‘A’ or ‘D’ key my character falls through the map

I’m not sure if it’s the correct solution to the movement issue but this is what I ended up doing and it works.

  1. Split the IA_Move input into IA_Move_Left and IA_Move_Right inputs.
  2. Make them box Axis 2D (Vector2D) Value Types.
  3. Add Modifier = Swizzle Input Axis Values = YXZ + added Negate modifier as well.
  4. In the Index of IA_Move_Left, I unchecked X, on IA_Move_Right I unchecked Y.

Configured the following in my character BP below, had to create an action for each input instead of having one for both inputs but at least it works.

Ended up being a bad solution.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.