Author Topic: A question on movement speed.  (Read 1604 times)

Offline GrimTrigger

  • Transcended Spirit
  • ***
  • Posts: 115
  • LV: 3
  • Cutscenes.....bane of my existance.
    • View Profile
A question on movement speed.
« on: March 06, 2013, 08:46:13 PM »
Is it possible to modify the movement speed of a  character more than just the (movement speed) option? To expand on this, I find the speed of 3 to be give for slow walking, but 4 seems too fast. I'd love  achieve a 3.5 if possible.

Any way to make that happen?
Until The Final Blade Falls:
Quick Side Quest Guide

Latest Tileset Project

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3201
  • LV: 386
  • Gender: Male
  • Choco Octo <3
    • View Profile
Re: A question on movement speed.
« Reply #1 on: March 06, 2013, 09:15:32 PM »
There's a variable called move_speed in Game_Character. You can change the value to anything really. Since you only want to change the game player's speed, a simple
Code: [Select]
$game_player.move_speed = 3.5will do the trick.



Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!


Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Offline GrimTrigger

  • Transcended Spirit
  • ***
  • Posts: 115
  • LV: 3
  • Cutscenes.....bane of my existance.
    • View Profile
Re: A question on movement speed.
« Reply #2 on: March 06, 2013, 09:32:09 PM »
O.o it's so simple....how did I not see it....


Thanks !
Until The Final Blade Falls:
Quick Side Quest Guide

Latest Tileset Project

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 775
  • LV: 33
    • View Profile
Re: A question on movement speed.
« Reply #3 on: March 11, 2013, 11:33:58 PM »
I have to make a note on this.

When the players movement speed is not a whole number (3 or 4, but not decimals, 3.5), you need to expect some Screen Tearing.  That is to say that a lot of graphics will not line up correctly for their positions, so you'll see underneath stacked graphics.  Well, in XP anyway...
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Offline Moshan

  • Transcended Spirit
  • ***
  • Posts: 135
  • LV: 1
  • Gender: Male
    • View Profile
Re: A question on movement speed.
« Reply #4 on: March 12, 2013, 09:38:49 AM »
 Also, is not working with Blizz-abs. If you jump the game will crash.

Offline Wecoc

  • Transcended Spirit
  • ***
  • Posts: 108
  • LV: 45
  • Gender: Male
    • View Profile
    • Mundo Maker
Re: A question on movement speed.
« Reply #5 on: March 14, 2013, 03:10:48 PM »
I have to make a note on this.

When the players movement speed is not a whole number (3 or 4, but not decimals, 3.5), you need to expect some Screen Tearing.  That is to say that a lot of graphics will not line up correctly for their positions, so you'll see underneath stacked graphics.  Well, in XP anyway...

What if you change on Game_Character 2 's update_move:

Code: [Select]
distance = 2 ** @move_speedto this?

Code: [Select]
distance = 2 ** (@move_speed).round
That should work...

Edit: Oups, sorry it's true. I did not check it.
« Last Edit: March 15, 2013, 07:49:13 PM by Wecoc »

Offline ThallionDarkshine

  • Ethereal Devastator
  • ****
  • Posts: 274
  • LV: 56
  • Gender: Male
    • View Profile
Re: A question on movement speed.
« Reply #6 on: March 14, 2013, 06:39:24 PM »
That would remove the whole point of using floating point values.

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 775
  • LV: 33
    • View Profile
Re: A question on movement speed.
« Reply #7 on: March 16, 2013, 12:03:42 AM »
You might also try changing @move_speed = (int) to @move_speed = (int) * 1.0, which will force it to remain a decimal.

4 is a whole number
4.0 is a decimal

Although the value is the same, the engine recognizes 4.0 as a decimal, which may prevent crashes.
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Offline Wecoc

  • Transcended Spirit
  • ***
  • Posts: 108
  • LV: 45
  • Gender: Male
    • View Profile
    • Mundo Maker
Re: A question on movement speed.
« Reply #8 on: May 26, 2013, 07:24:22 PM »
Sorry for this necro but I was silly there. When I said
Code: [Select]
distance = 2 ** (@move_speed).roundI wanted to say
Code: [Select]
distance = (2 ** @move_speed).round
I checked it and it seems to work with 3, 3.5, 4, 4.5, 5 .... no with 3.2, just halfs :( but it's something xD
« Last Edit: May 26, 2013, 08:10:03 PM by Wecoc »

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20015
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: A question on movement speed.
« Reply #9 on: May 27, 2013, 12:26:12 AM »
.round still returns a float value. Simply convert it to an integer right after that.

Code: [Select]
distance = (2 ** @move_speed).round.to_i
EDIT: Or if you want to round the moving speed before the power operation.

Code: [Select]
distance = 2 ** @move_speed.round.to_i
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.