Just gonna make a slight change to masters code just to show an alternativeand then try to get your problem resolved.
Change myvar to be hp (ie:hit points) . On the create of the Actor that should get destroyed after 2nd hit put
- Code: Select all
hp = 2;
in the collision event do
- Code: Select all
hp--; //this is the same as hp = hp -1
if(hp<=0) DestroyActor;
Finally make sure repeat while this actor is colliding is set to No.