You just need to check the distance between the tile and spaceship.
So if distance(Spaceship.X,Spaceship.Y,Tile.X,Tile.Y) <= 100
Spaceship.stop (The pathfinding one)
Spaceship.set angle towards position tile.x,tile.y
Hi nimos100, thanks for taking the time to answer, and for the suggestions.
Unfortunately, I can't figure out how to check the distance in C2. I understand you when you said to check the distance via:
<font color=brown>if distance(Spaceship.X,Spaceship.Y,Tile.X,Tile.Y) <= 100
Spaceship.stop (The pathfinding one)
Spaceship.set angle towards position tile.x,tile.y</font>
I can see that, but I can't find any condition that checks distance.
The spaceship wont collide with the tiles as they are solid. However you can turn off solid for the selected tile if you want, but you have to regenerate the obstacle map then. And in its current state if you have to many objects, your program might pause for a short time while calculating, which makes the function rather useless, as no one cares to play a game that pauses all the time :D
Let's say you open the game on the iPad. You touch-click on an asteroid tile, and the spaceship flies over to the tile, is angled towards the tile, and mines the tile on its own. All through just one touch on a tile. Is that possible without having to turn off collision?
Or what if, you flew the spaceship by pressing and holding your finger down on a tile, and the spaceship follows the position of your touch, thereby making the ship mine the tile?