Destroy ander respawn actor when touched by other actor

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

  • marc_greiffmarc_greiff Member, PRO Posts: 250

    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.

  • marc_greiffmarc_greiff Member, PRO Posts: 250

    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.

Sign In or Register to comment.