I would like to know if there's a script that adds decimals to the variables. I did look for a post about this in VX Ace but there wasn't. If is it possible I would like to know, if it's not then don't worry.
Can I use decimal variables in RPG Maker VX Ace?
RPG Maker VXAce Supportyou could save the contents of a variable as a script call, but I don't remember if the engine rounds them back internally.
by default, divisions between integers come out as integers in Ruby.
if you want a float division, you need to turn 1 into 1.0.
and, most of the values you'd handle through editor variables are integers by default.
by default, divisions between integers come out as integers in Ruby.
if you want a float division, you need to turn 1 into 1.0.
and, most of the values you'd handle through editor variables are integers by default.
HMM... Wait, I am gonna give context, I don't know why I didn't give context in the post, but however.
Osea, I would like to make the player stay between 2 Tiles (with a teleportation), but that is clearly not possible because there is no Decimals and I can't specify that I want to teleport it between 2 tiles. Do you think that with the decimals I could move it between 2 Tiles?
(I don't want to move the player freely like in the Victor Engine Pixel Movement Script, but to teleport the player between 2 Tiles.)
However, that is why I would like to know if I can add decimals. (I saw that inside the Victor Engine, decimals exist... So it is possible, but I don't know how. Maybe if we could get the part of the script that creates the decimals, we could find a way?)
Osea, I would like to make the player stay between 2 Tiles (with a teleportation), but that is clearly not possible because there is no Decimals and I can't specify that I want to teleport it between 2 tiles. Do you think that with the decimals I could move it between 2 Tiles?
(I don't want to move the player freely like in the Victor Engine Pixel Movement Script, but to teleport the player between 2 Tiles.)
However, that is why I would like to know if I can add decimals. (I saw that inside the Victor Engine, decimals exist... So it is possible, but I don't know how. Maybe if we could get the part of the script that creates the decimals, we could find a way?)
there might be a workaround if it's just for that effect, by offsetting the player to the middle, through a common event and some hacking and slashing.
if that's only what you need, there might be a way.
but, again, I don't remember if the engine rounds the numbers when it comes to tiles.
in fact, the positioning of the player itself IS a half measure: it's X + 0.5, but the map all works with round numbers.
if that's only what you need, there might be a way.
but, again, I don't remember if the engine rounds the numbers when it comes to tiles.
in fact, the positioning of the player itself IS a half measure: it's X + 0.5, but the map all works with round numbers.
Original thread: https://forums.rpgmakerweb.com/threads/can-i-use-decimal-variables-in-rpg-maker-vx-ace.161441/