Destroy ander respawn actor when touched by other actor
Jeffrey97_0000
Member Posts: 13
Hi,
I am trying to create a rule which gives a point if actor 1 collides with actor 2. The problem is, somehow my current rule doesn't work.
So now I'm trying to create a rule which destroys actor 1 after it touched actor 2 by the following:
On actor 1:
"If game.X is 1 then destroy this actor"
On actor 2:
"If collide with actor 1 then change game.X to 1"
Game.X is a boolean attribute.
Somehow when I'm running the game it always crashes because of these rules. Does anyone know what I'm doing wrong?
Thanks in advantage!!
Comments
Not sure about the crashing part, but make sure actor 1 is below actor 2 in the layer order, you want game.X to be triggered BEFORE actor 1 checks for it.
additionally, make sure that both actors have the have the the "movable" attribute set to true (in attributes/physics), this is necessary for the collides with rule to work.