Have A Bullet Travel Only A Certain Distance?

Discussion in 'How Can I...?' started by spacerain, Sep 7, 2017.

Tags:
  1. spacerain

    spacerain Boxer

    Joined:
    Dec 4, 2016
    Messages:
    42
    Likes Received:
    6
    My character's bullet fires constantly, without the player having to tap or anything, as intended. However, I want the bullet to travel only a certain distance, instead of traveling as far as the scene allows it to. How can I have a character bullet disappear after it reaches a certain distance?
     
  2. Insanity

    Insanity Boxer

    Joined:
    Apr 24, 2017
    Messages:
    66
    Likes Received:
    23
    I'm assuming you're using the dogfight game type.

    All you need is a platform just outside of the top of the game frame (or transparent inside the top of the game frame if that's what you want) that moves at the same speed as your character.
    Make sure this platform goes across the whole top of the screen and set the collision type to "No Collide" and the destroy type to "Character".
    If this platform is inside your game frame you'll need to play around with damage and health on both the platform and your character to make sure your character doesn't die but the bullets are destroyed.

    For some reason I can't attach BBDocs to show you :(
     
  3. Insanity

    Insanity Boxer

    Joined:
    Apr 24, 2017
    Messages:
    66
    Likes Received:
    23

Share This Page