Portal 2D movement Mechanics

For questions about using Classic.

Post » Tue Dec 17, 2013 2:54 pm

How to make a movement mechanics like in portal flash? i have a example file with similar mechanics bud i have one problem with backwards running. How can i make that - when payer is running backwards, animation Run2 is playing?
Here is the game by the way - http://portal.wecreatestuff.com/portal.php!
and my example file - https://www.dropbox.com/s/91nxvhx5j7cp7gw/Movement.capRaGeR2013-12-17 14:59:04
Posts: 16
Reputation: 391

Post » Sun Dec 29, 2013 2:45 pm

Here the cap: https://dl.dropboxusercontent.com/u/28484936/portal_game_animation.cap

I was able to get the Run2 animation playing by adding a couple extra conditions. I checked for the X Speed of the Platform Behaviour and test that against the Width of the players Body Animation (which tells us which direction it's facing). There are better ways to do that, but I didn't want to change your .cap too much.

I would make a private variable called "playerDirection" and make it 1 when he's facing right and -1 when he's facing left. Then when you're calling animations just test the "playerDirection" against the actual Movement Speed to determine which animation to play.

Your animations look awesome, btw!
Posts: 66
Reputation: 3,791

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest