• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

[Solved] Need help with currency counting

K

krispydrink

Guest
Hi there, non-programmer here teaching myself GM2 - I've set up a system to count how much currency my player has, however, there's a way to trigger the count twice on each chest object if the player collides then re-collides with the chest object before it's animation is done playing, which is obviously not ideal. I'm a bit stumped as to the best way to fix this. Any tips are very much appreciated!

example.PNGexample 2.gif
 

Rusty

Member
Delete the 'else' statement, it is resetting the gotmoney variable to false which is allowing the player to double collect.

gotmoney="False" goes in your variable definitions or your create event.
 
Top