Actor collision only works in first moments of scene
I have two actors that have behaviors upon collision, but somehow the collision is not detected after time passes. Does anyone have any idea what the problem might be?
I needed to add "self.time " somebody told me to make it work - and indeed without it the collision wasn't detected at all - but now it seems still buggy.
I needed to add "self.time " somebody told me to make it work - and indeed without it the collision wasn't detected at all - but now it seems still buggy.
Comments
It works if it happens within 1 second, but after they just overlap and nothing happens.
perhaps a gameAttribute boolean collided and leave it false
on main Actor:
Rule: when
Attribute: game.collided is false
changeAttribute: self.Image To: whatever is your default/initial image
Otherwise:
--changeAttribute: self.Image To: whatever is your collide image
--and use the self.time to changeAttribute: game.collided To false
On destroy actor:
Rule: when
Event: overlaps or collides with actor type: your main Actor
--changeAttribute: game.collided To: true
--Destroy this actor
@};-