• 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: Increment integer variable EVERY step

bacteriaman

Member
This seems obvious and simple, but incrementing an integer variable EVERY step has me baffled.

I have a simple STEP event containing a incremented integer variable:

Code:
point_x += 1;
This variable is intended to increase EVERY step, but instead it appears to be incremented every 4 steps.

Code:
show_debug_message(string(point_x));
Debugging the value after each increment shows:

Code:
1
1
1
1
2
2
2
2
3
3
3
3
 
Last edited:

FrostyCat

Redemption Seeker
This looks like the result of 4 instances of that object in the room, each executing their own increment.
 

hippyman

Member
This looks like the result of 4 instances of that object in the room, each executing their own increment.
Exactly this. Something you can do is put the instance id at the beginning of the string and it will be more clear what's happening.
 
Top