*NEW* Current Version on STEAM: 16.793Webchat:Visit the chat
startwater_top% = INTEGER(1+(INTEGER(RND(2)+3) * 16))startwater_left% = 1+(INTEGER(RND(4)+1) * 16)startwater_right% = ((resx/2)+1) + (INTEGER(RND(20))*16)
ccx = INTEGER(cs.ca_x)
FUNCTION boxcollm:qx1%,qy1%,qs1%,qs2%,qx2%,qy2%,qs3%,qs4%IF BOXCOLL( qx1+2,qy1+2,qs1-4,qs2-4,qx2+2,qy2+2,qs3-4,qs4-4)RETURN 1ENDIFENDFUNCTION
Quote from: bigsofty on 2023-Apr-07I had problems with the INTEGER command iirc. It was producing weird rounding errors. I never liked how it rounded down from 0.9 to 0 either.BTW, as long as you store a (floating point)number in an integer variable it will implicitly be cast to an integer so no need for direct casting.I don't use GLBs RND function (I use my own) but doesn't that produce integers? If so then I don't think you need to use INTEGER at all in your code.