Moving in one direction and shooting in the other

0 favourites
  • 5 posts
From the Asset Store
Shoot balls to destroy as many blocks as possible, at each stage the game will become more difficult.
  • 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."

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • Like this:

    <img src="https://dl.dropbox.com/u/57899112/MirrorMouse.PNG" border="0" />

  • Thanks :D

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)