Jump to content

View more

Image of the Day

#ld38 #screenshotsaturday Mimosa Fizz action gif #2 https://t.co/TUzdppvfUL
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Dumb Game Maker problem

4: Adsense
  • You cannot reply to this topic
1 reply to this topic

#1 Shane C   Members   

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


#2 slicer4ever   GDNet+   

6683
Like
10Likes
Like

Posted 15 May 2014 - 08:12 PM

*
POPULAR

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