I'm making a minimap, and so that I can have any sized map I'm using this to work out a number to multiply things by:
The idea is, on a 100x100 sized map this should return:
wide = 1.19
high = 0.82
Then this will be multiplied by the player's x and y positions to make the co'ords to use for the player sprite on the minimap.
The problem is, RGSS always rounds these to a whole number for some reason.
Returns
"1, 0"
Is there any way I can do this?
Thanks in advance.
Code:
wide = 119 / $game_map.width
high = 82 / $game_map.height
The idea is, on a 100x100 sized map this should return:
wide = 1.19
high = 0.82
Then this will be multiplied by the player's x and y positions to make the co'ords to use for the player sprite on the minimap.
The problem is, RGSS always rounds these to a whole number for some reason.
Code:
p "#{wide}, #{high}"
Returns
"1, 0"
Is there any way I can do this?
Thanks in advance.