The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: Theodie12345 on January 14, 2009, 10:17:09 PM

Title: Stop player from running when pressing down shift.(Resolved)
Post by: Theodie12345 on January 14, 2009, 10:17:09 PM
When you press and hold shift, it allows the player to run.(This is a default thing from Rpg Maker VX.) What I want is to have this whole thing eliminated so that the player can't run at all. All in all, what I'm asking is how to turn off this script so that holding the shift key or any other button wouldn't allow the player to run.

Thank you,
Theodie12345
Title: Re: Stop player from running when pressing down shift.(Help)
Post by: modern algebra on January 14, 2009, 10:31:53 PM
Well, you can disable dashing by checking a box when you set the properties of a map.
Title: Re: Stop player from running when pressing down shift.(Resolved)
Post by: Theodie12345 on January 14, 2009, 11:21:36 PM
I didn't know what dashing was in the first place, heh. Thank you.
Title: Re: Stop player from running when pressing down shift.(Resolved)
Post by: HellRazor on February 10, 2009, 05:44:12 PM
What about if you hold down SHIFT(Input::A) and then press UP or DOWN, can you disable dash only for this two directions, and the others keep dashing and animating?
Title: Re: Stop player from running when pressing down shift.(Resolved)
Post by: Leon Oswald on February 11, 2009, 01:48:01 PM
Quote from: Theodie12345 on January 14, 2009, 11:21:36 PM
I didn't know what dashing was in the first place, heh. Thank you.
Dashing => running
Like a Modern Algebra says, you can disable it by checking a box in map properites...
Title: Re: Stop player from running when pressing down shift.(Resolved)
Post by: AmIMeYet on February 11, 2009, 03:18:04 PM
While this has been necroposted already... I might as well post this bit of code:
#=============================================================================#
# # #                            ANTI DASH HACK                           # # #
# # #                              By AmIMeYet                            # # #
# # #                           please credit me                          # # #
#=============================================================================#
class Game_Player < Game_Character
  def dash?
    return false if @move_route_forcing
    return false if in_vehicle?
    return true if Input.press?(Input::A) and $game_map.disable_dash?
  end
end

This snippet basically inverts the dashing.. allowing you to dash only when 'disable dashing' is checked.
This way, normal maps disable dashing, but the ones you set to disable actually allow dashing..

It should be placed where you normally place the scripts ('above main', in the materials section of the scripts window)..
Title: Re: Stop player from running when pressing down shift.(Resolved)
Post by: SolstICE on February 22, 2009, 08:03:58 AM
that was a cool idea amimeyet :D grabbed it for my game thanks
Title: Re: Stop player from running when pressing down shift.(Resolved)
Post by: AmIMeYet on February 22, 2009, 11:21:46 AM
Glad you like it :)