Permanently modifying move speed
#1
Hello, it's me again!

I have a question, is it possible to permanently modify the move speed values? the 4: Fast is a little slow when walking through the maps and 5: Faster is too fast, I was trying to get something between those two, like 4.5 speed.

I tried going to Game_Character 1 and found @move_speed = 4. i tried changing it to @move_speed = 4.5 and it works, but if I use Set Move Route to change the player's move speed it returns to 4. I can't find where I can modify the speed in set move route to make 4: Fast become 4.5.

Thanks for the attention!  Blushing + Cheery
Reply }
#2
(05-24-2017, 01:51 AM)Keeroh Wrote: Hello, it's me again!

I have a question, is it possible to permanently modify the move speed values? the 4: Fast is a little slow when walking through the maps and 5: Faster is too fast, I was trying to get something between those two, like 4.5 speed.

I tried going to Game_Character 1 and found @move_speed = 4. i tried changing it to @move_speed = 4.5 and it works, but if I use Set Move Route to change the player's move speed it returns to 4. I can't find where I can modify the speed in set move route to make 4: Fast become 4.5.

Thanks for the attention!  Blushing + Cheery

Other than in game character or through a script call, you would not be able to event a variable speed that is not a whole number. Would involve editing the interpreter and still would require a script call either way.

So, a script call from an event with


Code:
$game_player.move_speed = {amt here}

Would be the main way I can suggest.
Reply }
#3
(05-24-2017, 02:24 AM)BeJeremiah Wrote:
(05-24-2017, 01:51 AM)Keeroh Wrote: Hello, it's me again!

I have a question, is it possible to permanently modify the move speed values? the 4: Fast is a little slow when walking through the maps and 5: Faster is too fast, I was trying to get something between those two, like 4.5 speed.

I tried going to Game_Character 1 and found @move_speed = 4. i tried changing it to @move_speed = 4.5 and it works, but if I use Set Move Route to change the player's move speed it returns to 4. I can't find where I can modify the speed in set move route to make 4: Fast become 4.5.

Thanks for the attention!  Blushing + Cheery

Other than in game character or through a script call, you would not be able to event a variable speed that is not a whole number. Would involve editing the interpreter and still would require a script call either way.

So, a script call from an event with



Code:
$game_player.move_speed = {amt here}

Would be the main way I can suggest.

Thanks for the fast reply! I was using game_guy's dash and sneak script, but with it I couldn't edit the player move speed through set mouve route. This script have a script call to enable or disable it, but whenever i tried using the game would crash.
It's sad because it did exactly what I wanted but oh well

I tried using $game_player.move_speed = 6 to test, but i had an error
"NoMethodError occurred while running script."
Reply }
#4
Hrm.... (CHECKING) ....

Okay. Well, the move_speed value in the Game_Player class was not set up to be a value that can be received via a script call. In other classes, you may see things at the beginning that read "attr_accessor :move speed" . Putting that statement at the beginning of the Game_Player class would let you read-from and write-to that value within Game_Player. Otherwise, it is a value that is only inherited from the Game_Character class and affected only by systems like the Interpreter (Map events) calls.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }
#5
I see. Well, that was a good lesson about ruby xD

Let me see if I'm following right. If I put attr_accessor :move_speed in Game_Character, which is the class that have the variable move_speed, the variable becomes public and I can use it when calling Game_Player, so $game_player.move_speed = 6 will work. Am I following right?

Edit: I tested this and it worked!
Reply }
#6
Yep.  

BUT!!!!    To achieve the same feature for events, place the same attr_accessor statement within Game_Character and Game_Event.

That way, you can use:

$game_map.events[event_id].move_speed = value

attr_accessor allows you to read and write the specified value to/from that class.
attr_reader allows you ONLY to read from that class (within reason)

The Event and Player classes merely 'inherit' data and methods from Game_Character....
.... (Game_Player < Game_Character ) ....
So you don't need to add all the methods from Game_Character into Game_Player.  There is no 'moving' or 'jumping' methods in Game_Player.  But they exist in Game_Character.  ;)  Game_Player is what we call a 'child' class.  It's daddy is Game_Character, and since the methods are in Character.... Player has access to them.

But you still want to add the attr_accessor statements to all the classes.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   Possible means to speed up Bitmap TONE code? DerVVulfman 7 3,241 06-11-2023, 08:22 PM
Last Post: kyonides
   Help modifying a script Keeroh 7 10,387 06-11-2017, 04:43 PM
Last Post: DerVVulfman
   Just move the Cursor of the Item_Scene to the right Djigit 24 24,819 08-18-2015, 03:00 AM
Last Post: DerVVulfman
   Meagan's Particles' speed Raou 6 9,386 04-01-2015, 03:43 PM
Last Post: Raou
   Atoa ACBS Target move wrong after move to center Djigit 4 6,696 08-04-2014, 05:16 AM
Last Post: Djigit
   Possible to move battle actors when escaping? NewHope 8 13,942 07-27-2012, 06:14 AM
Last Post: NewHope
   Modifying Actor ID to Class ID for Advanced Individual Battle Commands Script NewHope 1 4,680 07-11-2012, 11:37 PM
Last Post: NewHope
   Pixelmovement and speed ark 2 5,717 05-31-2010, 05:51 PM
Last Post: ark



Users browsing this thread: 1 Guest(s)