I invented 2 new functions, basicly its a Floor and Ceil function, but you can specify the size, and it works with ints as well.
This code did some miracles in my RPG.
Function SuperFloor:Int(val:Int, size:Int) While (val Mod size) <> 0 val:-1 Wend Return val End Function Function SuperCeil:Int(val:Int, size:Int) While (val Mod size) <> 0 val:+1 Wend Return val End Function
This code did some miracles in my RPG.