Main Menu

Stop player from running when pressing down shift.(Resolved)

Started by Theodie12345, January 14, 2009, 10:17:09 PM

0 Members and 1 Guest are viewing this topic.

Theodie12345

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

modern algebra

Well, you can disable dashing by checking a box when you set the properties of a map.

Theodie12345

I didn't know what dashing was in the first place, heh. Thank you.

HellRazor

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?

Leon Oswald

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...
Sorry for my stupid English, I'm from Slovakia :)

Craftknight's rule
Story: 23%
Maps: 4%
Systems: 5%

AmIMeYet

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)..

Portals - in VX!
[spoiler=Do require's in VX:]
$LOAD_PATH << Dir.getwd #You only need to call this once
Kernel.require("includable.rb") #replace includable.rb with the name of the file you want to load
[/spoiler]
[spoiler=Invert Dash enabling:]#=============================================================================#
# # # 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)..[/spoiler]

SolstICE

that was a cool idea amimeyet :D grabbed it for my game thanks

AmIMeYet


Portals - in VX!
[spoiler=Do require's in VX:]
$LOAD_PATH << Dir.getwd #You only need to call this once
Kernel.require("includable.rb") #replace includable.rb with the name of the file you want to load
[/spoiler]
[spoiler=Invert Dash enabling:]#=============================================================================#
# # # 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)..[/spoiler]