My game consists of a ball that moves with the gyroscope that has to hit a spider. When you reach 10 points, a dog appears. If you hit the dog, the game ends and you have to start over. My problem is that the dog sometimes appears on top of the ball or the spider. Is there any way to prevent this?
Probably. You want to ensure the location of the dog is not the same coordinates of the current ball or spider location before you display it .
Programming Your App to Make Decisions probably discusses how you can avoid to things at the same location.
A guess is if the dog appears at a random location on the Canvas, check if it's location will be the same as the spider or ball . If the preprogrammed dog coordinates are either the spider or ball, display the dog with different coordinates.
Shoot the dog out of a dog house?
There is a block called 'CollidingWith'.
You can use this to test if the dog is overlaping with other ball/spider. If yes, give him another location.
The problem is that I'm using that block to detect if the ball is touching the spider(add a point) or the dog(game over).
You need an if/then test in the collision event for the ball.
if other = dog component then game over
if other = spider component then add a point.
what about providing a screenshot of your relevant blocks?
how does the dog appear?
and what about following the advice by @SteveJG