Dannygs90

Veteran
Veteran
Joined
Jan 5, 2020
Messages
44
Reaction score
4
First Language
Spanish
Primarily Uses
RMVXA
Hey, so, I want to add the option to change via switch between the basic "hold shift to run" to "press shift to change to run mode or walk mode"..... I'm not sure if I explained it well. Is there any way to do that? Like, if you activate a switch, it's the "press to change" option, and if you deactivate it, it's the "hold to run" option.

Otherwise, at least I'd want to toggle the auto-dash via switch, so you don't have to always press shift to run.
 

kyonides

Reforged is laughable
Veteran
Joined
Nov 17, 2019
Messages
884
Reaction score
425
First Language
English
Primarily Uses
RMXP
My KShlenam ACE Options Menu script lets you turn the Dash feature on and off. Perhaps that could help you somehow.
 

Dannygs90

Veteran
Veteran
Joined
Jan 5, 2020
Messages
44
Reaction score
4
First Language
Spanish
Primarily Uses
RMVXA
My KShlenam ACE Options Menu script lets you turn the Dash feature on and off. Perhaps that could help you somehow.
But I don't want to disable the dash option, I want to make it so you don't have to be holding Shift to run
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
4,690
Reaction score
1,327
First Language
English
Primarily Uses
RMVXA
I had most of this code in a script from Fomar0153. Just added the switch option.
Ruby:
# ╔═════════════════════════════════════╦════════════════════╗
# ║ Title: Dash Switch Control          ║  Version: 1.00     ║
# ║ Author: Roninator2 / Fomar0153      ║                    ║
# ╠═════════════════════════════════════╬════════════════════╣
# ║ Function:                           ║   Date Created     ║
# ║                                     ╠════════════════════╣
# ║  Toggle Dash by Switch              ║    07 Feb 2023     ║
# ╚═════════════════════════════════════╩════════════════════╝
# ╔══════════════════════════════════════════════════════════╗
# ║ Instructions:                                            ║
# ║                                                          ║
# ║    Configure switch to control the dash function         ║
# ║    True = Press shift to run (default)                   ║
# ║    False = Toggle run/walk with button push (shift)      ║
# ║                                                          ║
# ╚══════════════════════════════════════════════════════════╝
# ╔══════════════════════════════════════════════════════════╗
# ║ Updates:                                                 ║
# ║   2023-Feb-07 - Initial publish                          ║
# ║                                                          ║
# ╚══════════════════════════════════════════════════════════╝
# ╔══════════════════════════════════════════════════════════╗
# ║ Terms of use:                                            ║
# ║ Free for all uses in RPG Maker VX Ace - except nudity    ║
# ╚══════════════════════════════════════════════════════════╝

module R2_Toggle_Dash
  Dash_Switch = 4 # switch that controls the changing of the dash controls
end

class Game_Player < Game_Character
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias dash_initialize initialize
  def initialize
    dash_initialize
    @dash = false
  end
  #--------------------------------------------------------------------------
  # * Determine if Dashing
  #--------------------------------------------------------------------------
  def dash?
    return false if @move_route_forcing
    return false if $game_map.disable_dash?
    return false if vehicle
    if $game_switches[R2_Toggle_Dash::Dash_Switch]
      return Input.press?(:A)
    else
      return @dash
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  alias dash_update update
  def update
    dash_update
    @dash = !@dash if Input.trigger?(:A)
  end
end
 

kyonides

Reforged is laughable
Veteran
Joined
Nov 17, 2019
Messages
884
Reaction score
425
First Language
English
Primarily Uses
RMXP
Ruby:
class Game_Player
  Dash_Switch = 4 # switch that controls the changing of the dash controls
  def dash?
    return false if @move_route_forcing
    return false if $game_map.disable_dash?
    return false if vehicle
    return true if $game_switches[Dash_Switch]
    return Input.press?(:A)
  end
end

That should suffice here.
 

Dannygs90

Veteran
Veteran
Joined
Jan 5, 2020
Messages
44
Reaction score
4
First Language
Spanish
Primarily Uses
RMVXA
I had most of this code in a script from Fomar0153. Just added the switch option.
Ruby:
# ╔═════════════════════════════════════╦════════════════════╗
# ║ Title: Dash Switch Control          ║  Version: 1.00     ║
# ║ Author: Roninator2 / Fomar0153      ║                    ║
# ╠═════════════════════════════════════╬════════════════════╣
# ║ Function:                           ║   Date Created     ║
# ║                                     ╠════════════════════╣
# ║  Toggle Dash by Switch              ║    07 Feb 2023     ║
# ╚═════════════════════════════════════╩════════════════════╝
# ╔══════════════════════════════════════════════════════════╗
# ║ Instructions:                                            ║
# ║                                                          ║
# ║    Configure switch to control the dash function         ║
# ║    True = Press shift to run (default)                   ║
# ║    False = Toggle run/walk with button push (shift)      ║
# ║                                                          ║
# ╚══════════════════════════════════════════════════════════╝
# ╔══════════════════════════════════════════════════════════╗
# ║ Updates:                                                 ║
# ║   2023-Feb-07 - Initial publish                          ║
# ║                                                          ║
# ╚══════════════════════════════════════════════════════════╝
# ╔══════════════════════════════════════════════════════════╗
# ║ Terms of use:                                            ║
# ║ Free for all uses in RPG Maker VX Ace - except nudity    ║
# ╚══════════════════════════════════════════════════════════╝

module R2_Toggle_Dash
  Dash_Switch = 4 # switch that controls the changing of the dash controls
end

class Game_Player < Game_Character
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias dash_initialize initialize
  def initialize
    dash_initialize
    @dash = false
  end
  #--------------------------------------------------------------------------
  # * Determine if Dashing
  #--------------------------------------------------------------------------
  def dash?
    return false if @move_route_forcing
    return false if $game_map.disable_dash?
    return false if vehicle
    if $game_switches[R2_Toggle_Dash::Dash_Switch]
      return Input.press?(:A)
    else
      return @dash
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  alias dash_update update
  def update
    dash_update
    @dash = !@dash if Input.trigger?(:A)
  end
end
It worked, thanks a lot!
 

Latest Threads

Latest Posts

Latest Profile Posts

My mom showed up yesterday and I wanted to proudly show off my comic con web page. So of course, it no longer existed. I guess when the 4 day event was over they removed it.
Feeling like a creative Pattato this morning...
Calibrating the timing of dialogue is deffo my new least favorite thing.
I died aged 27 to cancer. Then I was reborn in a South-American state. I retained all memories and skill and had a goal from my previous life I needed to finish, but now I was just a 1-year-old girl capable of only smiling at others.

Dreams like this one make me glad I'm able to wake up from them at will.
Found a critical bug the other day with the time system that would have caused none of the NPCs to spawn. Since I use dev mode to test time-based stuff, I didn't catch this for way too long!

Forum statistics

Threads
129,979
Messages
1,206,686
Members
171,205
Latest member
CuriousMonkeyX
Top