Event movement speed (Fine tune)

I am trying to fine tune the speed movement (like 4.5, 4.8, etc.) of my events in 02 steps:

First i set a non integer variable value like this :

$game_variables[18]=5.5

Then in the event movement route that is in a parallel trigger, the autonomous movement section is set to custom, speed 4 and frequency 5, but i want to fine tune the speed.

As it's set to custom, i tryed to do this script call in the move route section:

@move_speed = $game_variables[18]

But the movement speed is still being set at 4. I am doing something wrong or is there another way to fine tune the speed movement of my events?
well, that @move_speed will be run within eval on game_interpreter so its not linked to any event actually... you need to do it like:


event.move_speed = something...


so like maybe: $game_map.events[1].move_speed = 5.5
Very good, this script call (made in the event's page) recognized non integers perfectly.

Thanks for sharing your knowledge.

Problem solved. This topic can be closed.  🤘
just remember that @ variables are class variables so they should always be called/modified within their class, or when doing outside you do class.variable_name (like on this case, in which the class object can be obtained from $game_map.events[id])


take note though that you can only modify class variables outside of the class if they have defined operators or were defined as attr_accessor 🙂

Original thread: https://forums.rpgmakerweb.com/threads/event-movement-speed-fine-tune.23311/