Page 1 of 1

problem with offset or something else idk help please?

Posted: Mon Sep 09, 2019 3:37 am
by anavsky
Hi guys

This is my first game ever, my friend and I did it in a gamejam a year ago and I decided to finish since we couldn't make it work. My friend did most of the code, but now I'm making it. The goal is to make Peter (the fish) collect starfish. When Peter is in the same position of the starfish, you get a point and the starfish moves to a random location

After trying for so long to make that happen, I manage to get the starfish to move when Peter touches it by changing some values in his offset, however, now Peter can't get to the corner of the screen.

If I put the offset of Peter back to the values my friend set, the starfish will only move if Peter doesn't actually touch it.

Here's how the game is now.
peter.love
Any tips, please?

Re: problem with offset or something else idk help please?

Posted: Tue Sep 10, 2019 7:36 pm
by steVeRoll
Hi and welcome to the forums!
It seems there was a problem when you uploaded the file. I only see the attachment's name, but not the file itself.
Could you try uploading the file again? We will be able to help you if you send your code.

Re: problem with offset or something else idk help please?

Posted: Tue Sep 10, 2019 10:54 pm
by raidho36
Seems like your problem is that the starfish is allowed to spawn outside of reachable area. Currently your coordinates are limited by the size of the screen (presumably); simply limit the coordinates where the starfish is allowed to spawn to be within reachable area.