• 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 Problem to add something at the end of a list

T

Tarte

Guest
Hi ! I have a problem, in my game, the items bought at the shop arrive in a list. When looking at purchased items, the list is read and items are placed (in order). But I would like the items purchased last to be first. For that I would like them to be added at the end. Thank you for your answers in advance ;)
 

FrostyCat

Redemption Seeker
Then read your array from the back to the front. Arrays do not automatically resize down the way lists do, so you need to keep a separate variable indicating where the last inserted value is.
 
Top