Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

changing movement speed

Is there somewhere in the scripting where I can manually change the speed of the player? Or a command I can call to do so? I just really feel that "4:fast" is a bit too fast and "3: slow" is a bit too slow. Basically, how do i set how many pixels the player moves each frame?

Note: I can't script hardly at all...so please use simple language :)
 
I gave it a quick skim, and it seems like line 81 of Game_Character 2 does it.

Code:
distance = 2 ** @move_speed

If I multiply the result by 2, everything moves twice as fast. Fiddle with it as you see fit.
 
Sweet, I'll fiddle around with it. Thanks.

EDIT: I'm trying to make only the player move according to a specific formula. So what I'm trying to do (since I don't know how to test if the current event being tested is the player) is set the player's speed to 7 via actionscript (you can't normally set it that high in RMXP), then test for that value in the script and act accordingly. Sorry if that doesn't make sense, but basically how do i get the $game_map.events[event_id].move_speed = 7 code to work when I call a script? I thought 0 might be event_id for the player but I guess not...it gives an error.
 
i have a problem with this. The system still only allows a set pixels per amount movement... if i have $game_player.move_speed=0.1 for instance. It doesnt do anything. So does anyone know how to make the system move by decimals (e.g. 0 = no movement, 0.1 = a tenth of movement speed 1, 0.2 = two tenths of movement speed 1, etc.)
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top