How do I shoot up and down without changing player's angle

0 favourites
  • 6 posts
From the Asset Store
Players follower. use it for anything which follows the player
  • Hi,

    in a top down game, my 8-movement Player should be able to shoot up an down without changing his angle to "up" and "down".

    I've set the 8-movement to "set angle = no" and mirrored the sprite. But how do I get it to shoot up an down.

    Can anyone help me out. Thanks!

    Held

  • If key [down] is down and key[fire] is pressed, create your bullet and set its angle to 90.

    If key [up] is down and key [fire] is pressed, create your bullet and set its angle to 0.

    As you can see, the above two events are similar, so you'll want to try and make them sub-events of the 'key fire is pressed' condition, for example.

  • But then the bullet which is already fired up immediately changes it's angle if I hit the opposite direction and fire.

  • This indicates that you're not picking the correct instance of the bullet to manipulate when you set its angle. It sounds like there's a 'set angle' action on your bullets which doesn't have a corresponding condition directing it towards a specific bullet.

    If you include the 'set angle' action in the same event as the creation of the bullet, it will apply to the created bullet. Otherwise, you'll need to specify which bullet you want the angle adjustment to affect.

  • Aah, I see. Right now, I'm not having my project in front of me, but I think, in the corresponding-subject lies my mistake. So, I just have to separate the spawning and the up-down-request, right? Will try it tomorrow. Thanks a lot!

    Held

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ...made subevents, works like a charm.

    Thanks again!

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