top of page
How to activate the animation of movements

Now, in order to set the animation for all the movements, we have to go to the blueprint file for the animation and select a page
Animation and we have to do the following:
1- Left mouse click and create a point (new state machine) we call it all animation and link it with output animation
new state machine: It is the point inside which all animation related software resides.

2- Orientation inside all animation, then we extract from the output point (animation state)

state: is the type of action to be performed
Now we need to make that state the idle state and the run state together, so we have to start by changing the name from state to IdleAndRun, and then we have to do the following:

When we go to the state (IdleAndRun), we will find the output animation and we have to write the points (nodes) that will make us do the animation.
We previously created a variable that allows us to call player data within the event graph page

3- We have to drag the variable as bp char into the state

3- We have to take the speed of the character and the direction of its speed, and that is by bringing the two points from as bp char:
get velocity: to get the character's velocity
break vector 3f: dividing the speed directions in all axes, we will only deal with the X axis because the character will only run left or right

4- We have to bring the not equal point from the X axis

5- We have to bring the point select animation by bool and it can be shortened by typing in the search box
(blend)
select animation by bool: Makes us choose which animation to run if the code is true or false

6- Now we have to choose which one will work if the code is true or false
Of course, we will choose play run if the code is correct, because the character's movement speed will be zero
And in the case of false, the character must be standing (idle) because it is equal to 0.

7- We connect them to the output, then compile

When we start playing, we find that the animation does not work, because we must specify the source of the animation for the character to receive them all, and we can do that:
1- Go to the blueprint bp_char and click on animation component and select the animation library that we want to use, which is animation_bp


2- Press compile and start playing. Thus, the running and standing animation should work
We did an animation for the wilderness but we didn't do a special animation for the fall. To create a fall animation, you must do the same steps for standing and running.

We call it char_blueFall and put it in the flipbooks folder

We put it inside allanimation, call it fall, and choose the char_blueFall animation
Go to the allanimation status page and do the following:

1- From the idleAndRun state, we extract a new state and call it jump. From the jump state we extract a new state and call it fall

2- In the jump state, we put the point play jump
3- In the fall state, we put the play fall point


There is a transition rule: it is the reasons (software) that make the character move from one state to another, so in order to move from a state of running or standing to a state of jumping, we must do the following:

1- Pressing the transfer base between standing and running and jumping

2- Bringing value to personal data

3- We bring the point is falling from the character as bp char, and we connect it to the output result
is falling: means that the character is not on the ground, and if it is not on the ground, it means that it is jumping

Now, in order for the character to move from jumping to falling, we have to do the following:
1- Go to the transfer base located between jump and fall

2- We have to recall the value of the personal data, its speed, and the direction of the speed

This time we only want to control the direction of the speed from the Z axis, which is the upper axis that relates to the jump
3- We put the point less because when jumping and the value is less than 0, this means that the character falls

Now we have to make the character fall back to the idle state and to do that:

1- Connect from point fall to point idleAndRun or vice versa, it does not matter from where you start connecting the connection base.
2- When going to the delivery base, we have to bring the value of personal data again

3- We have to create the point is walking
is walking: means the character is on the ground

4- Click compile and start playing
bottom of page