Counting in Feet and Inches

JoeBJoeB Member Posts: 160
Hey there, I'm making a simple stacking game and I want to measure the stack's height by feet and inches. Right now I have a measuring system that says something like, there's 15 boxes in this stack, but I want each box to measure 1 inch each. So if I have 15 boxes it would say 1' 3" instead.

Anyway, if anyone can help, thanks in advance! :)

Comments

  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    floor(TotalBoxes/12)
    mod(TotalBoxes,12)
  • JoeBJoeB Member Posts: 160
    floor(TotalBoxes/12)
    mod(TotalBoxes,12)
    Thanks! Although Im quite new to GS and I'm not sure in what context I should use that code...
Sign In or Register to comment.