Different bullets directions based on image number

0 favourites
  • 3 posts
From the Asset Store
Adjusting the game screen for different resolutions (Letterbox scale)
  • Hi,

    I have 3 images of my player holding his gun.

    1. holding it upwards.

    2. holding it straight.

    3. holding it downwards.

    so what I want is to get him to shoot in the right direction on each image.

    Something like:

    If imagenumber=0 angle=45

    If imagenumer=1 angle=0

    if imagenumer=2 angle=315

    Is this in anyway possible?

    I also use the mirror function to get him to face the other direction, how would I get that to work with this correctly?

  • bit difficult to know exactly what you need but...

    depending on if your player is changing angle with the controls or its an animation

    player is on screen.....set bullet to player.angle degrees

    player fires bullet

    trigger once

    or

    player compare animation frame is 1,2,3....set bullet angle accordingly

    and when mirrored simply

    player is mirrored...set bullet angle to direction you want...

    does that help?....

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks they now shoot in the right direction, but when I shoot and then change the animation frame, all the bullets move into the new direction.

    Is there any way to handle every bullet as a different object, so they wont get effected by the angle-change, when they have already been shot.

    EDIT: got it fixed by making a mouse click event for every bullet direction.

    Thanks!

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