Moving in one direction and shooting in the other

Get help using Construct 2

Post » Sun Jul 01, 2012 4:25 am

Hey People,
I'm a real newbie here and I've worked on a platform project for about a day and I'm stuck at the moment. So, 'How do I...' Get my player to move left while looking right and have his hands with a gun point and shoot at the cursor.
For the moment all I need is to move left and right while looking left or right according to where the cursor is.
Note: the quality of the game is similar to that of a game on Kongregate called "Dude and Zombies."
B
2
Posts: 3
Reputation: 256

Post » Sun Jul 01, 2012 5:51 am

You don't say how you are using the platform behavior, so I'm assuming you're using just the default keyboard commands. What you need to do is override those defaults -- do not turn them off, but just insert a keyboard object into your game and then add an event to redefine the left and right keys to make the player move in the same direction as the key, but also add an action to mirror or not mirror the player to make him look the way you want him to.

I think redefining the keys and mirroring the player is described in the two platformer tutorials. They're pretty popular, so you should find them on the first or second page of the tutorials. I'll have a little more time tomorrow, so if you don't still don't get it, let me know.
B
29
S
11
G
12
Posts: 281
Reputation: 11,888

Post » Sun Jul 01, 2012 10:24 pm

I already have that in the game along with animations, I just can't figure out the events/actions for the character to look towards the right if the mouse X is greater than player X and left when mouse x is less than player X.
B
2
Posts: 3
Reputation: 256

Post » Thu Jul 05, 2012 1:28 am

Like this:

B
29
S
11
G
12
Posts: 281
Reputation: 11,888

Post » Thu Jul 12, 2012 10:15 am

Thanks :D
B
2
Posts: 3
Reputation: 256


Return to How do I....?

Who is online

Users browsing this forum: DemantDigitalArt and 23 guests