top of page
Setting the necessary settings to control the player
Now we have to create a file and name it input(Inside that file we will put some entries that will help us control our personality)

To go to the input list:
We have to click the left mouse button on the input of the Input file and go to input
And press input mapping context and call it allmovement

input mapping context: This is where we will collect all the inputs for the character blue_char
Now we have to create one input (to walk right and left) and let's do this:
In the input file, press the left mouse button and input, then input action, and we call it MovingRightLeft

input action: What will happen when you interact with the input
In the case of MovingRightLeft, when interacting with this portal, the character will be able to move left and right
When we click on MovingRightLeft we will find that value type (digital bool) and that value does not work with a 2D game so we have to change its value to Axis1D(float)

Now let's go to allmovement and put the MovingRightLeft entry in it and do this:
1- Open allmovement
2- At the mapping menu (buttons), we will press + and put the entry in it

After placing the entrance, a sign (keyboard) will appear for us, and inside it we will put the button to be pressed to activate the entrance
3- We press the keyboard and put the button we want to go right, I will put the (D) button
Now we have to create another button to go left
4- To create the button, we have to press the + corresponding to MovingRightLeft then press the keyboard, I will put the button (A)

We have to tell the program that when we press the (A) button, go in the opposite direction (D), and let's do that:
1- We have to click on the arrow next to the keyboard button
2- When modifiers press +
3- Click on the negate option
negate: the opposite direction on the x axis

Now we have to repeat the previous steps and create another entrance to jump
1-Create an input action and name it jump
2- set the value to axis1D(float)
3- Put the entry in allmovement
4-Make the keyboard button (Space Bar)

We have to create something in Blueprint called game mode base so that we can save the character we want to play in the stage and to do so:
1- In the blueprint file, create a new blueprint and choose the game mode base and name it 2dgamemode

2- Within the values mod, set the default pawn class character bp_char

3- Click compile (you must click compile every time you change anything in the program)

4- Put 2dgamemode in the world setting menu so that you can start playing with bp_char every time you play in the worldM

In which you will start playing with the character, we must call player start by:
1- Click on the shortcut box

1-basic
2-player start

And when we press the play button


Thank you for your kind reading
bottom of page