Moving Object And Enemy Both Disappear After Collision

Discussion in 'How Can I...?' started by fast999, Mar 30, 2019.

  1. fast999

    fast999 Avid Boxer

    Joined:
    Sep 7, 2017
    Messages:
    151
    Likes Received:
    9
    How do i implement that when an object moving hits an enemy so both disappear?
     
  2. kelvin_ye

    kelvin_ye Boxer

    Joined:
    Oct 8, 2015
    Messages:
    49
    Likes Received:
    49
    I would set both the object's and enemy's Destroy Type to Destroy All.
    Screenshot 2019-03-30 15.29.01.png
    Then, I would add the Health and Damage component and set the health and damage both to 1 for both the object and enemy.
    Screenshot 2019-03-30 15.31.47.png
     
  3. fast999

    fast999 Avid Boxer

    Joined:
    Sep 7, 2017
    Messages:
    151
    Likes Received:
    9
    thnx man it helped but i wanted to ask another thing because i forgot to ask.Actually i also want at the same time when during the game object collides with character,its destroys character so that it kills the character and the object disappears again as in the case of enemy collision with object.The problem is that if i select destroy all for enemy so it would destroy the whole map or level.Because enemy is a moving object on ground while the object is fireball.So i want when the fireball touches either the character or enemy so both could disappear at the same time...?
     
  4. kelvin_ye

    kelvin_ye Boxer

    Joined:
    Oct 8, 2015
    Messages:
    49
    Likes Received:
    49
    For the objects you don't want the enemy to destroy, like the ground, I would set the health of that object to 99999. For the character, I would set the health and damage also to 1.
     
  5. fast999

    fast999 Avid Boxer

    Joined:
    Sep 7, 2017
    Messages:
    151
    Likes Received:
    9
    thnx man for the help. :) ...can u also provide me with the answer of my last post which is the (time control button) and is just 3 posts before this post ....that would be of great help man for my game???
     

Share This Page