Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Removing Hero movement

I wanted to do this recently, too.  After some searching, I found that there's a script that's part of the SDK/MACL.

You can get it over at SephirothSpawn's website, this topic:
http://owai.ipbfree.com/index.php?showtopic=87

The necessary script is: Systems.SDK Methods
Though you'll need to put in the other SDK/MACL scripts that are required.

After putting in the scripts, to toggle movement:
Code:
$game_player.disable_player_movement = !$game_player.disable_player_movement

Alternatively, you could set it to true or false.

(For non-SDK solution, probably find the player movement code wherever that is and don't call it if a certain variable is true (essentially what the above script does)).
 
Find this code in Game_Player
Code:
    unless moving? or $game_system.map_interpreter.running? or
           @move_route_forcing or $game_temp.message_window_showing
      # Move player in the direction the directional button is being pressed
      case Input.dir4
      when 2
        move_down
      when 4
        move_left
      when 6
        move_right
      when 8
        move_up
      end
    end

You can probably use a global variable for fast edition, I would use an instance variable in Game_Player and make it editable through attr_accessor :variable.

Here is an example with a global var:

Code:
    unless moving? or $game_system.map_interpreter.running? or
           @move_route_forcing or $game_temp.message_window_showing or $movement_disabled
      # Move player in the direction the directional button is being pressed
      case Input.dir4
      when 2
        move_down
      when 4
        move_left
      when 6
        move_right
      when 8
        move_up
      end
    end
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top