@vee41 Thank you very much it works great!
4 global variables, and a few events. Brilliant!
@Whiteclaws It has the same problem as before it only randomly spawns the sprite inside of the first 32 pixels in the top left corner of the layout.
That's ok though vee41's solution works just fine with my game project.
Thank you both for your help