How do I get this Sprite to shoot left?

0 favourites
From the Asset Store
Shoot balls to destroy as many blocks as possible, at each stage the game will become more difficult.
  • So I've got this really simple player Sprite (you might even call him a square) and he's got platform behavior. He walks left, he walks right, jumps up and down. The whole thing.

    He also spawns another Sprite with Bullet behavior with a button press.

    But he can only fire right. Because the bullet speed is positive. If I trigger the sprite to mirror on a direction press the bullet will spawn from the opposite side, but it still travels to the right. I can get the bullet to travel left if I change the player sprite's angle 180 degrees. BUT, this causes the sprite to be upside-down, and not mirrored like I want.

    Changing the speed of the bullet to a negative number with a corresponding direction press would logically work, but by doing so it seems to change the direction of already fired bullets as they travel across the screen.

    This should not be this hard? What am I missing here?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Lol I have the same problem with my platform game..... now need to wait till I found the solution.

    Help please

  • Lol I have the same problem with my platform game..... now need to wait till I found the solution.

    Help please

    Since I posted my question I tried a work around that kind of works. I created a second bullet sprite with a negative speed (so it goes left) and set up a numeric variable in an array called LeftRightShot that gets set to either 0 or 1 whenever you press right or left. using that number I trigger which bullet fires and from what image point on the player sprite.

    This works. But it doesn't seem very elegant. And if I mirror my sprite (to show it running left of right some how) it'll mirror the image points.

    EDIT: and I just realized, if I'm going to mirror my sprite I don't have to have a second image point to spawn the second bullet sprite, since I'm mirroring my first one I just spawn my left firing bullets from the same image point.

    So yeah... this seems to be the solution? Have two bullet sprites, one for each direction? And a bunch of triggers to keep them in check?

  • I'm uploading video to youtube now.. please take a look.. all left action failed

  • here are my video

  • zzzzz I need 300 rep required before I can share youtube link sooooooooooo disapointing

  • I already try using left sprite instead of mirror.. but I failed to do that... but I'm gonna try that again since you manage to solved yours

  • 12345678910https://www.youtube.com/watch?v=87NNNV6HA4Y&feature=youtu.be

    delete the 1234567890 and you have the link

  • When you pick up the Pig, are you creating a separate pig bullet sprite?

  • yes... its all separate sprite.... I just dont know how to apply on left arrow press and apply the left throw of what so ever for the left

  • Couldn't you just check if the player is mirrored, then: Bullet->set angle of motion -> -180

    If that flips your bullet sprite upside-down, you can disable that in the bullet behavior properties (there's an option that sets the bullet sprite angle to the angle of motion). Next add:

    Bullet->set mirrored->mirrored

    To the above part (within the check player is mirrored part)

  • Not sure if this will help, but he's my Event Sheet. Because I'm sloppy I went ahead and highlighted the relevant bits.

  • Try this demo shoots both ways

  • Uh... how do I update Construct 2 to 191? I can't find a 'Check for Update' button ANYWHERE.

  • https://www.scirra.com/construct2

    look for beta download

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