Destroy Character Bullet

Discussion in 'Technical Discussion' started by adrogdesigns, Feb 22, 2018.

  1. adrogdesigns

    adrogdesigns Avid Boxer

    Joined:
    Dec 5, 2016
    Messages:
    318
    Likes Received:
    233
    So i want my character bullet to be destroyed if it hits an object.
    I can get the bullet to destroy if it hits an enemy, but i can't make it happen when hitting a fixed object, such as a platform.. or a wall for example.
    So what am i missing, seems only to be possible to destroy character bullet with an enemy...
    Any advice would be great thanks...
     
  2. Christoph

    Christoph Miniboss Boxer

    Joined:
    Oct 4, 2015
    Messages:
    2,807
    Likes Received:
    2,309
    Put a transformer to each object that moves the bullet out of the screen. I think it’s the only way.
     
  3. adrogdesigns

    adrogdesigns Avid Boxer

    Joined:
    Dec 5, 2016
    Messages:
    318
    Likes Received:
    233
    Thanks.
    Tried that but it looks crap, hahah
    i was really wanting the bullet to be destroyed on impact with platforms or walls.
    ill try playing around some more to find a work around...
     
  4. spicedbeangames

    spicedbeangames Miniboss Boxer

    Joined:
    Mar 31, 2016
    Messages:
    1,389
    Likes Received:
    596
    You could make a game object set it to destroy character bullets. Set its health to 99999999. Then place them on the sides of your platforms or where you want the bullet to be destroyed.
     
    Christoph and adrogdesigns like this.
  5. Christoph

    Christoph Miniboss Boxer

    Joined:
    Oct 4, 2015
    Messages:
    2,807
    Likes Received:
    2,309
    Yes. Just thought that too. It should work by adding health and damage to the character bullet and the platforms. This way you would have a death animation of the bullet.
     
    adrogdesigns likes this.
  6. adrogdesigns

    adrogdesigns Avid Boxer

    Joined:
    Dec 5, 2016
    Messages:
    318
    Likes Received:
    233
    Thanks guys. @Christoph @spicedbeangames
    But it doesnt work, and I'm not sure why.. Only objects that are set to enemy (destroy character) will destroy the bullet.
    Ive tried setting my bullet to character bullet, which only enemies all destroy it.
    I've tried setting my bullet to just an object set to destroy enemy, added health and damage, but it still won't get destroyed.
    Only way i can manage to destroy the bullet is if all objects are set to enemy, which is no good as my character will just die.
    It must work somehow, ill keep playing around..
     
  7. spicedbeangames

    spicedbeangames Miniboss Boxer

    Joined:
    Mar 31, 2016
    Messages:
    1,389
    Likes Received:
    596
    I will see if I can make a video tomorrow. This is what I did for my Trump vs Zombies shooter
     
  8. adrogdesigns

    adrogdesigns Avid Boxer

    Joined:
    Dec 5, 2016
    Messages:
    318
    Likes Received:
    233
    ok cool.
     
  9. Christoph

    Christoph Miniboss Boxer

    Joined:
    Oct 4, 2015
    Messages:
    2,807
    Likes Received:
    2,309
    Put it to enemy. But in the damage value put it to zero. So it doesn’t destroy the character.
     
    adrogdesigns likes this.
  10. adrogdesigns

    adrogdesigns Avid Boxer

    Joined:
    Dec 5, 2016
    Messages:
    318
    Likes Received:
    233
    Tried that, but its still not destroying the bullet.
    The bullet seems to be taking on the character role....
    i even tried making the platform an enemy, gave my character health 9,99999,99999,
    Bullet health zero, and it still doesnt destroy the bullet..
     
  11. Christoph

    Christoph Miniboss Boxer

    Joined:
    Oct 4, 2015
    Messages:
    2,807
    Likes Received:
    2,309
    Hmmm. What are you using? 2.3.3? Have you tried it in 2.2.9? It sounds like a bug...if I have time I’ll try myself tomorrow.
     
    adrogdesigns likes this.
  12. adrogdesigns

    adrogdesigns Avid Boxer

    Joined:
    Dec 5, 2016
    Messages:
    318
    Likes Received:
    233
    yea I'm using 2.2.9.
     
  13. spicedbeangames

    spicedbeangames Miniboss Boxer

    Joined:
    Mar 31, 2016
    Messages:
    1,389
    Likes Received:
    596
    Here you go.
     
    Chibiske, Danlespect and adrogdesigns like this.
  14. adrogdesigns

    adrogdesigns Avid Boxer

    Joined:
    Dec 5, 2016
    Messages:
    318
    Likes Received:
    233
    Thanks for the video,
     
  15. adrogdesigns

    adrogdesigns Avid Boxer

    Joined:
    Dec 5, 2016
    Messages:
    318
    Likes Received:
    233
    @spicedbeangames
    so the set up that you showed is good, but unfortunately doesnt quite suit my game...
    But i think i may have figured out a few work arounds.
    Thanks so much for the video, and your time.
    I might have to end up going that way, but don't really want to change my bullet set up...
    Its probably the fact that I'm doing something weird that doesnt want it to work, hahah
     
  16. spicedbeangames

    spicedbeangames Miniboss Boxer

    Joined:
    Mar 31, 2016
    Messages:
    1,389
    Likes Received:
    596
    You can use the same idea, if you want your bullets to be destroyed on platforms. You will need to play around with the sizes of the enemy object that destroys the bullets and place it at the sides of your platform.

    It could create problems if your character collides with these objects (he will die), so you may have to make them tiny enough to register the bullet impact without touching your character - if that makes sense.
     
  17. Chibiske

    Chibiske Boxer

    Joined:
    Feb 14, 2018
    Messages:
    19
    Likes Received:
    4
    Nice tutorial. wanted to know this also, so that my character bullets has a set range.

    also a question. what is the MAX health you can give to a character or object??
     
  18. adrogdesigns

    adrogdesigns Avid Boxer

    Joined:
    Dec 5, 2016
    Messages:
    318
    Likes Received:
    233
    it does thanks,
    i was thinking of putting an enemy object set to zero opacity over all the walls and platforms, a bit smaller than the size, but i have already made 80 scenes, and dam that will be a lot of work, hahahah
    And yes i made 80 scenes then decided i wanted my character shoot, hahahahahaha.
    Also i tried adding in an enemy object inside the animation box of my platform and walls, but it doesnt work, dam
     

Share This Page