Bullet bouncing

This forum is currently in read-only mode.
From the Asset Store
Bouncing ball
$9.99 USD
Template for a bouncing ball game, fully documented in comments and video
  • so far I know how to create a bullet and when it collides with an enemy the bullet bounces but when it did, it does not follow the next closest target but instead goes straight towards the exit.

    I also cannot find a way to do so.

    Here are my events:

    + System: Start of layout

    -> BadGuy: Set angle to random(360)

    + MouseKeyboard: On Left mouse button Either single or double clicked

    -> System: Create object Bullet on layer 1 at (MouseX, MouseY)

    + Bullet: On collision between Bullet and BadGuy

    + Bullet: [negated] Bullet: Value 'hIT' Equal to 1

    -> BadGuy: Spawn object Dummy on layer 1 (image point 0)

    -> Dummy: Set 'LastTarget' to BadGuy.UID

    -> Bullet: Destroy

    + System: For each Dummy

    + BadGuy: [negated] BadGuy: Unique ID is Dummy ('LastTarget')

    + Dummy: Pick closest to: BadGuy.X, BadGuy.Y

    -> Dummy: Set angle towards BadGuy

    + System: For each Bullet

    + BadGuy: Unique ID is Bullet ('ID')

    -> Dummy: Set angle towards BadGuy

    + Dummy: Value 'Produce' Equal to 0

    -> Dummy: Spawn object Bullet on layer 1 (image point 0)

    -> Bullet: Set 'hIT' to 1

    -> Bullet: Set 'ID' to BadGuy.UID

    -> Bullet: Set angle to Dummy.Angle

    -> Dummy: Set 'Produce' to 1

    + Bullet: [negated] On collision between Bullet and BadGuy

    -> Bullet: Set 'hIT' to 0

    + Dummy: Value 'Produce' Equal to 1

    -> Dummy: Destroy

    + BadGuy: Is outside layout

    -> BadGuy: Rotate 5 degrees clockwise

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Can you post your cap file showing this? You can usually host free with DropBox

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