Simple in delphix to work out when a sprite is colliding:
Simply> collision; in the domove and it will fire when a collision occurs.
But what if I need to know when a collision is not taking place at any 1 time.
See the problem I have, is I am collecting jewels. Now, one jewel in particular needs to be hit 3 times before it turns into diamond
When I hit once, it increments the counter of times it has been hit. But, once it has been hit I need to set the boolean to false so it may not be hit again.
I would like to then set back to true second it realises the collision is no longer occuring:
For example: Approaching jewel>>>>collision detected>>docollision is used>>>1 is added to the counter>>>boolean is set to false to stop further collisions>>collision with jewel is over>>>boolean is set back to true awaiting next collision.
Perhaps I am doing this a long way?
Any ideas?
Bookmarks