Replace Object On Collision

Discussion in 'How Can I...?' started by Evaldas, Oct 21, 2018.

  1. Evaldas

    Evaldas Boxer

    Joined:
    Jul 31, 2018
    Messages:
    9
    Likes Received:
    0
    Hi!

    Maybe anyone would have a solution for having some game logic, for example:

    If object 1 collides with object 2, object 3 is spawned.

    It seems very basic game logic, but I can't find a way to do that in BB...
     
  2. The Pumpkin Studios

    The Pumpkin Studios Moderator

    Joined:
    Sep 25, 2018
    Messages:
    25
    Likes Received:
    10
    what you can do, is place the object three in the death animation of object 1. so when object 1 dies, it spawns object 3.

    if it does not die, then you can try an action, on which when it hits, you can place the object3 in the hit animation.
     
  3. Evaldas

    Evaldas Boxer

    Joined:
    Jul 31, 2018
    Messages:
    9
    Likes Received:
    0
    Cool, it kinda works - I've managed to spawn the 3rd object via advanced actions. But don't understand how to make an object destroy an object. For example:

    I set Object1 Preset to Physics object, Collision type to "Collide" and Destroy type to "Destroy Enemy".
    I set Object2 Preset to Enemy, Collision type to "Collide" and Destroy type to "Destroy Enemy".

    When they collide nothing happens. I've tried various sets of Collision types and Destroy types for both of the objects, but they just don't interact. What am I missing?
     
  4. The Pumpkin Studios

    The Pumpkin Studios Moderator

    Joined:
    Sep 25, 2018
    Messages:
    25
    Likes Received:
    10
    do they have any Hp? does the character has any Hp? you can also change the type of the object to enemy. you may also play around with enemy bullets. it may work better in your case.
     
  5. Evaldas

    Evaldas Boxer

    Joined:
    Jul 31, 2018
    Messages:
    9
    Likes Received:
    0
    Yes, tried to add damage and hp options, but they still don't interact... Seems that I'm doing some simple thing I don't know about wrong :) Haven't tried the bullet preset, I'll try that one.
     

Share This Page