Sensing not doing as expected

I’m trying to use the sensing block to detect a collision between two actors:
when the ant collides with the pie, I’d like the variable to increment by 1.

Have I done something wrong? Or is it simply about layers, and the two aren’t actually colliding/touching?
Also, how I can I hide the actor once the collision/touching has occurred?


The problem is that you have 1 pie Actor that you’re using as a stamp to create multiple “pie” images; also your variable is called “collect_pie” but this code block is trying to change one called “pie”

The pie images are not Actors so you cant “collide” with them.

What you might want to do, instead of stamping the pie, is create clones of the pie, and then use the “when touching clone of [Actor]” code block. A cloned Actor is a full Actor, where as a stamp is more like paint on a canvas.

You can create a clone of an Actor by using this code block: and the clone inherits the properties of the original Actor.

So you can move your Actor to the position you want to place your “stamps” then create a clone of it:

I hope this helps!
~Chris Murphy

Thanks for your very clear and detailed explanation Chris.
Very much appreciated.