• Hey! Guest! The 40th (!!!) GMC Jam will take place between February 25th, 12:00 UTC to March 1st 12:00 UTC. Why not join in this very special anniversary jam! Click here to find out more!

There's a bug in my game and I have tried everything to fix it.

Georgeee

Member
Hi there,

So I'm using game maker for an assignment I have to do for my IT class, so I'm pretty new to the software. I love how easy it is to use and how quickly you can make a game with it. However, I cannot seem to get rid of this game-breaking bug in my game.

My game is called 'Package Drop'. The aim of the game is you play as an automated moving plane. You have to left click or press spacebar to drop the coloured package on the same coloured house. The game itself is pretty simple, I had lots more mechanics that I wanted to add, but because of corona virus, I don't have as much time to produce this game.

The glitch comes in when the package drops, it seems to get stuck on the doors to the houses and, rather amusingly, boosts you're score up incredibly fast. I have tried changing the collision mask for each object used in the game to how I want, but somehow it still gets stuck on the doors. I've also tried changing the depth on the objects, using it as a foreground, a background, everything I know how to do and the glitch is still there. (I have attached an image of the problem to this thread)

If anyone can help me out or at least point me in the right direction, that would be greatly appreciated. If you want to give the gamemaker file a go, just let me know and I'll send you the different assets and the gamemaker file. :)
 

Attachments

obscene

Member
You probably want to have some variable that you turn on and off during a collision as to prevent the score from racking up.

delivered=false;

// collision code
if collision and delivered=false { score+=1; delivered=true; }

The getting stuck part I really don't know what you mean and generally things like this are impossible to figure out from the forum without seeing code. If you choose to post code make sure you wrap it in [ code ] [ / code ] tags so it's readable.
 

Georgeee

Member
You probably want to have some variable that you turn on and off during a collision as to prevent the score from racking up.

delivered=false;

// collision code
if collision and delivered=false { score+=1; delivered=true; }

The getting stuck part I really don't know what you mean and generally things like this are impossible to figure out from the forum without seeing code. If you choose to post code make sure you wrap it in [ code ] [ / code ] tags so it's readable.
okay thank you! Where would I put this variable? on the floor or on the package?
 

Nidoking

Member
Presumably, it is the package that should be delivered only once, while the door could receive any number of deliveries.
 
Top