Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Looping a series(math related)

A topic by toizeito created Jun 17, 2018 Views: 259
Viewing posts 1 to 1

So I am playing around in godot, specifically I am making a small memory game. Basically I have it so you can give it a number and it will make a series of buttons. I have it so the y coordinate will after 10 buttons increase using the formula 200+(floor(CardNumber/11)*100). What I am trying to figure out is a good way to make the x coordinate decrease after the 10 buttons so the buttons form rows of 10. I could probably do it through some if then, but it would be a bit cleaner and neater to do it in a single formula. The current formula is -100+(CardNumber*100).