Jump to content

  • Log In with Google      Sign In   
  • Create Account

Dumb Game Maker problem

  • You cannot reply to this topic
1 reply to this topic

#1 Shane C   Crossbones+   -  Reputation: 1283

Like
1Likes
Like

Posted 15 May 2014 - 05:04 PM

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!)


Edited by Shane C, 15 May 2014 - 05:04 PM.


Sponsor:

#2 slicer4ever   Crossbones+   -  Reputation: 3981

Like
10Likes
Like

Posted 15 May 2014 - 08:12 PM

(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.

Edited by slicer4ever, 15 May 2014 - 08:12 PM.

Check out https://www.facebook.com/LiquidGames for some great games made by me on the Playstation Mobile market.





PARTNERS