Skip to main content
GameDev.net gamedev.net
🔒 Locked 🎲 GameMaker

Dumb Game Maker problem

Started by Shane C May 15, 2014 at 11:04 PM 0 replies 2.8k views
Original Post
Shane C
Shane C

Note: This is using Game Maker and its GML language. So the code might be a little different than what you have seen.

Okay so I put this code in a Generator to create falling rocks:


timer += 1
if(timer >= 120)
{
if(PlayerCharacter.x < 14512 && PlayerCharacter.x > 8512) instance_create(PlayerCharacter.x + 2000,408,FallingRock)
timer = 0
}
if(x < 8512) instance_destroy()

I wanted the rocks to be destroyed when they got behind 8512 x position.

The problem? I was deleting the Generator, not the rocks!

So since I placed the Generator at below 8512 x position, it got deleted every time I started the game.

(Don't hate on me for using Game Maker. I'll be making a game in Javascript soon probably as well, and you'll see more hilarity!)

slicer4ever
slicer4ever

(Don't hate on me for using Game Maker. I'll be making a game in Javascript soon probably as well, and you'll see more hilarity!)


I don't hate on you for using gamemaker(that's perfectly fine imo). i hate on you for all the goddamn magic numbers your using. changing a simple boundary size must be hell.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.