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

GML (Solved) How to save updating variable

Hi there,
I struggle with one thing simple thing.

I have a changing variable every half of a second. And I need to save for example past 6 values for 3 seconds and then rewrite them from the beginning.

Can someone help me out with this?
Many thanks
EH
 

Xer0botXer0

Senpai
Store six variables, then an alarm that activates at room_speed*seconds, in the alarm update the six variables.
 
T

TinyGamesLab

Guest
I would personally use an array ou a ds_list instead of storing into 6 different variables just to make things neat. But that is just my way....
If you need to update them every 0.5 second (removing the oldest one), you could use a ds_queue also.
 
Top