( Writing right now… )
This code will simulate the player running up walls.
Since code ends up being too large and thus confusing, i'm dividing it in parts.
1. How it works
This feature uses areas to determine where the wall is and to detect when the player jumps to it.
Using the function AddPlayerBodyForce i can simulate the force of each leg running up.
To get the interval between steps, i'm using Timers.
This is how the code looks like now:
We declare the area collision: (AreaWall1 is the area covering the wall and WallRunCollide is the function.)
void OnStart { AddEntityCollideCallback( "Player", "AreaWall1", "WallRunCollide", false, 0 ); }
And this is the function that triggers when the players collides with the area:
void WallRunCollide ( string &in p, string &in c, int s ) { AddPlayerBodyForce// ( 0, 20000, 0, false ); }