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.

Move speed defaults?

lmkris

Member

Is there a way to change what the move speed "defaults" are?  Playing with them, I've found that 3 is too slow, and 4 is too fast, but 3.5 is the right porridge for me.  There isn't a way to tell it that when something is 3, it should be 3.5, or a "script" inside events to tell it that the event should be walking at 3.5 to stay with the player?  I looked at the FAQ and searched, and saw something about a "$game_map.events[event_id].move_speed = n", and it may be the lack of coffee speaking, but for the life of me, I can't get it to work.  Keeps babbling about nil this and nil that.  :lol:

Thanks in advance; I really do appreciate it. :smile:
 
Well, if you would like to change the players default move speed you should look at the Game_Character 1 script at line 51:
Code:
    @move_speed = 4

Change number 4 based on which speed you wish to have.
But then if you would like to change this in-game, you have to add this line below the last attr_accessor in the Game_Character 1 script:
Code:
attr_accessor :move_speed

This will make it available for you to change the character's move-speed with this line inside a call script in-game:
Code:
$game_player.move_speed = n

and replace the "n" with the number/speed you want to change it to.
And in your case, if you want to change the move-speed to 3.5, then your call script should look like this:
Code:
$game_player.move_speed = 3.5

I hope that helped. And if you have any further questions don't hesitate to ask :thumb:

Over and out - Gando
 

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