How do I Make the bullet destroy when reaches specific range

0 favourites
  • 4 posts
From the Asset Store
This pack contains 10 types of bullet effects, with different shapes and colors.
  • willi just put an invisible object (in the "specific range") and make a condition where it disappears when the bullet collides with it? any suggestion guys

  • You can use the distance() system expression. Just compare the distance from the player to the bullets with your range and if the distance is greater than the range destroy it.

    For example:

    Compare 2 values: distance(player.X, player.Y, bullet.X, bullet.Y) > 200 <--- Your range in pixels

    ----> bullet: Destroy

    You could also use the fade behavior to destroy the bullet after a certain amount of time.

    I hope this helps!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can use the distance() system expression. Just compare the distance from the player to the bullets with your range and if the distance is greater than the range destroy it.

    For example:

    Compare 2 values: distance(player.X, player.Y, bullet.X, bullet.Y) > 200 <--- Your range in pixels

    ----> bullet: Destroy

    You could also use the fade behavior to destroy the bullet after a certain amount of time.

    I hope this helps!

    <h1>Gonna Try. Thankie! </h1>

  • It is already there. Use bullet own expression called 'distance travelled' as a condition.

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