Hey all. I'm new to Construct 2 and have been playing around with platform movement and animation for the past week or so, having done the very useful scirra.com/tutorials/253/how-to-make-a-platform-game tutorial.
I've encountered a few issues that I've managed to iron out by myself, such as stopping the player from mirroring the sprite the wrong way by pressing left and right at the same time etc.
The basics are all very intuitive, but I'm struggling with making a second idle animation that plays when the player hasn't moved for 2 seconds. I've been trying to use the Wait action.
Here's my prototype: lloydparker.com/game
My event sheet:
<img src="http://gamescrawl.com/wp-content/uploads/2013/04/game-logic.jpg" border="0" />
At the beginning, I thought I could simply do this:
If the player is not moving & is on the floor = Wait for 2 seconds, then Set animation to "IdleTap" (my foot-tapping animation). Then reset the animation when the player moves/jumps.
This caused all sorts of problems, as the IdleTap animation would trigger when the player was moving -- I think this is because the Wait command is executed every 2 seconds while those conditions are being met, and it was trying to trigger the queued-up animations even after the player had started moving.
So I added a global variable to try and make sure the Wait action only ran once, but now it seems to trigger my "push" (moving) animation randomly as well as when you jump from an idle position.
Any help would be greatly appreciated. Thanks.