I'm currently embarking on my first Construct2 project - a basic platform game - and I'm having some difficulty integrating animations along with controls. My player can jump, crouch and move left or right and I've set animations to trigger once any of these actions are in motion. Here's where I'm having difficulty:
Occasionally, whenever my player is moving and I try to jump, the jump is ignored. This didn't happen before I created the animations, so it's led me to believe that whenever a certain frame of the moving animation is 'active', the jump is ignored. My animation "Walking" is the only animation that uses a loop (it's only two frames), every other animation is a single frame.
Here's my events sheet for my player:
Player: Platform is on floor
- Player: Platform is moving = Player: Set animation to "Walking" (play from beginning)
- Player: Platform is NOT moving = Player: Set animation to "Idle" (play from beginning)
- Keyboard: Down arrow is down = Player: Set animation to "Crouching" (play from beginning)
- Keyboard: Down arrow released = Player: Set animation to "Idle" (play from beginning)
Player: Platform is NOT on floor
- Player: Platform is jumping = Player: Set animation to "Jump" (play from beginning)
Can anyone see why my problem is occurring? Is there a standard/bulletproof way of integrating animations with movement?
Make sure your collision boxes on both frames are set to box, while your there making sure the target points are the same.
I've had this issue before and this solved my problem.
Develop games in your browser. Powerful, performant & highly capable.
wow, thanks a lot - that fixed it. This software is almost too good!