Bullet behavior

0 favourites
From the Asset Store
This pack contains 10 types of bullet effects, with different shapes and colors.
  • Hi,

    Iam making a game, in which for example in one level there are three guns attached with the wall. one gun is headed downwards, one gun is headed left and the last one is headed towards right. And i have placed these guns in animation frame, like there are three frame, one contain right headed, next frame contain left headed and last one contain downward. when i will spawn the bullet, how it would differentiate its angle of motion seperately according to gun angle?

  • Wherever you've put the gun spawn bullet action, directly below it add an action 'set bullet angle to gun.angle' (in the same event)

  • yes i have already done it, but the issue is that i have added gun heading in different direction in an object's frames.... so basically it is a single sprite in which i have added three frame

    so in this case how it would differentiate...

  • Hmm you said 3 guns. You mean one gun object that animates between 3 frames? You use a condition, depending on frame=0 or 1 or 2, you set the angle of the bullet to 0, 90 or 180.

  • yes I had implemented this solution but it didn't work too.....

  • Post the events you used

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • here are the attached images

  • On the bullet's bullet behaviour set Set Angle to 'Yes' (ticked). Logic looks fine, you changed the bullet's angle but the bullet behaviour is probably not using the angle as the angle of motion. Alternatively you can use bullet set bullet angle of motion instead of set angle, if that's not too confusing.

  • Maham Imtiaz

    since there are 3 guns, it doesn't know which gun you are referring to when you try to set the angle.

    event 27 will have all the guns spawn a bullet, but events 28 to 30 still have all guns picked so it will probably use the first instance's angle.

    you need to add a "For each Firegun", then have each one spawn a bullet separately so you can check the animation frame and set the angle properly.

  • Maham Imtiaz

    since there are 3 guns, it doesn't know which gun you are referring to when you try to set the angle.

    event 27 will have all the guns spawn a bullet, but events 28 to 30 still have all guns picked so it will probably use the first instance's angle.

    you need to add a "For each Firegun", then have each one spawn a bullet separately so you can check the animation frame and set the angle properly.

    we established it's one gun

  • Maham Imtiaz

    since there are 3 guns, it doesn't know which gun you are referring to when you try to set the angle.

    event 27 will have all the guns spawn a bullet, but events 28 to 30 still have all guns picked so it will probably use the first instance's angle.

    you need to add a "For each Firegun", then have each one spawn a bullet separately so you can check the animation frame and set the angle properly.

    These are three guns in one object frames....

  • I don't think he understood what you meant... it is one gun sprite with three frames, and then I think he has three instances - each showing a different frame. but I could be wrong...

  • I don't think he understood what you meant... it is one gun sprite with three frames, and then I think he has three instances - each showing a different frame. but I could be wrong...

    It is one gun sprite with three frames, not three instances actually.....

  • Is it resolved now with my other comment?

  • no it is still not working with animations, but what I have done now is just use one sprite and placed them at different places with different angles, now it is getting angles seperately.

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