Spawning when actors collide, and destroy original actors

DigiChainDigiChain Member, PRO Posts: 1,288
edited September 2017 in Working with GS (Mac)

I have multiple instances of an actor (ACTOR 1) in the scene which the player can drag and drop where they like.
Each of these instances has a unique self.id (used to determine which actor is currently being dragged).

I would like to make it so that when ACTOR 1 is dragged and dropped onto another instance of itself, both instances of ACTOR 1 are destroyed and only one new actor (ACTOR 2) is spawned in their place.

I'm struggling to come up with a way of doing this. I hope someone can help! Thanks.

Comments

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273

    Not a perfect working example and only one way to do this, but hopefully this quick demo gets the idea across.

  • BigDaveBigDave Member Posts: 2,239
    edited September 2017

    hm dont know if this would work for you.

    But i would ignore your self.id

    -> if the actor collides with itself
    set spawn x and y as gloval variables (real) of the currently not dragged actor
    and set a bolean to true ( for a spawner actor within the scene to spawn your Actor2 on the pos)

  • DigiChainDigiChain Member, PRO Posts: 1,288

    Great thanks guys!

Sign In or Register to comment.