Is this condition really working as expected?
if( event.target and event.other.myType == "stone" )then
because in local collision, like this seems to be, there is no “event.target” but “self” object.
“event.target” is refered in global collisions.
If this is a local collision, the condition never becomes true.
FYI, “event.target” exists for local collisions, and it’s the same as “self”. This chart illustrates the difference:
https://docs.coronalabs.com/api/event/collision/index.html#object-references
I think the issue for @uche is still the global variables and some confusion that’s occurring as a result.
Brent
@Brent
Your are right, of course. I checked for “event.target” (is a table) instead of “event.target.name” in my code, and the fun part is: i did it right using “self.name”.
Sorry for the misleading post.