Spawning when actors collide, and destroy original actors
DigiChain
Member, PRO Posts: 1,288
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
Not a perfect working example and only one way to do this, but hopefully this quick demo gets the idea across.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
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)
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
Great thanks guys!