Gamepad for shooting?

0 favourites
  • 3 posts
From the Asset Store
Shoot balls to destroy as many blocks as possible, at each stage the game will become more difficult.
  • i have an Xbox 360 controller for C2 and works fine. i want the player to shoot in 7 directions instead of using the right analog stick while standing still. Like, left shoulder trigger is down, make the player pause movement, when not moving, the player grabs his bow and using the right analog stick to go in 7 directions. Also, i dont want to use the right analog stick while moving or grabbing his bow, only when not moving and standing still. Any way i can accomplish this?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • please explain what you want to do better. It's hard to understand.

    how does the player move? Left stick? and you want to aim with the Right stick?

    make the bow a separate sprite that is pinned (position only) to the player. Then map the angle of the bow to the angle the Right Stick is pointing. If you want it to snap to 7 directions, just check the range and set it to 0, 45, 90, 135, 180 etc...

    but remember Analog neutral is 0, X = 100 is all right X = -100 is all left and same for Y.

    if you specifically want to only aim when not moving you need to give the player an instance variable called isMoving (or if you are using the platform behavior one already exists) then set it to true when the player isn't moving. Then add that to your aiming code. But invert it so you are saying XisMoving (not moving) - allow them to aim.

  • is it possible for you to elaborate?

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