Script equivalent of Player Speed?

p0_boy

anti-kumbaya
Veteran
Joined
Mar 26, 2019
Messages
64
Reaction score
29
First Language
English
Primarily Uses
RMMV
Hello-

I was hoping that somebody might be able to tell me what the JavaScript equivalent of this is?

Code:
  ◆Set Movement Route:Player
  :Set Movement Route:◇Speed:6
The RMMV Script Calls spreadsheet has some information on using Game_Character.prototype.processMoveCommand instead of Set Movement Route, but I can see nothing about changing Player Speed.

Thank you!
 

Traverse

Veteran
Veteran
Joined
Jul 3, 2014
Messages
161
Reaction score
102
First Language
English
Primarily Uses
You need to look more carefully (or at least, look at the actual code in rpg_objects.js instead of just a spreadsheet, the sheet even tells you to do that). processMoveCommand() is the function that interprets the settings listed when you use the Set Move Route event command. The actual movement logic is done by executing other functions, there are separate ones like moveForward(), moveBackward(), moveTowardsPlayer(), etc that correspond to each of the different individual options on the list. processMoveCommand() just instructs which ones of these to execute based on what you set up.

The function you're looking for in this case is setMoveSpeed(). To change it by script, you'd be using $gamePlayer.setMoveSpeed(x). As you probably know, the default speed is 4, IIRC it goes up to 8 and down to 0.
 

p0_boy

anti-kumbaya
Veteran
Joined
Mar 26, 2019
Messages
64
Reaction score
29
First Language
English
Primarily Uses
RMMV
You need to look more carefully (or at least, look at the actual code in rpg_objects.js instead of just a spreadsheet, the sheet even tells you to do that). processMoveCommand() is the function that interprets the settings listed when you use the Set Move Route event command. The actual movement logic is done by executing other functions, there are separate ones like moveForward(), moveBackward(), moveTowardsPlayer(), etc that correspond to each of the different individual options on the list. processMoveCommand() just instructs which ones of these to execute based on what you set up.

The function you're looking for in this case is setMoveSpeed(). To change it by script, you'd be using $gamePlayer.setMoveSpeed(x). As you probably know, the default speed is 4, IIRC it goes up to 8 and down to 0.
Thank you, Traverse!

$gamePlayer.setMoveSpeed(x) worked perfectly!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

A bit of a "sparkle" update to the lower portion of the world map. :LZSexcite:
attack on titan final season is airing tomorrow, I'm excited and scared at the same time!

Forum statistics

Threads
105,883
Messages
1,017,232
Members
137,607
Latest member
Maddo
Top