• Advertisement
Sign in to follow this  

Dumb Game Maker problem

This topic is 1347 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement