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.

error in player movement script

I'm using this script made by SephirothSpawn found in the topic below

http://www.rmxp.org/forums/showthread.php?t=10760&highlight=movement

The problem is if you press F12 in game and then try to load a new game it errors saying

Script 'Disable player Movement' line 25:SystemStackError occurred.
stack level to deep


this is line 25

Code:
    seph_ispsystem_gameplayer_init


this is the whole code
Code:
#==============================================================================
# ** Game_Player
#==============================================================================

class Game_Player < Game_Character
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :disable_player_movement
  attr_accessor :disable_player_trigger
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias seph_ispsystem_gameplayer_init initialize
  alias seph_ispsystem_gameplayer_upm update_player_movement
  alias seph_ispsystem_gameplayer_uat update_action_trigger
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    # Turns Off Disable Movement & Trigger
    @disable_player_movement = false
    @disable_player_trigger = false
    # Original Initialization
    seph_ispsystem_gameplayer_init
  end
  #--------------------------------------------------------------------------
  # * Player Movement Update
  #--------------------------------------------------------------------------
  def update_player_movement
    # Original Update Player Movement Unless Movement Disabled
    seph_ispsystem_gameplayer_upm unless @disable_player_movement
  end
  #--------------------------------------------------------------------------
  # * Update Action Trigger
  #--------------------------------------------------------------------------
  def update_action_trigger
    # Original Update Player AT Unless Movement Disabled
    seph_ispsystem_gameplayer_uat unless @disable_player_trigger
  end
end


The custom scripts i'm using are

SDK Version 2.2 Parts 1-4
Edited Version of Scene Title - Extra command for test map
Skills + variables http://www.rmxp.org/forums/showthread.php?t=24268 - Does it even without the script so doubt its that
Scene_Realm - My own one, does it without the script so doubt its that but can post it if requested

Thank you for help you may give
 
Many scripts have problems with F12. I think its a RMXP program bug, not a script bug. Many scripts when you reset it in test mode, it causes you to be unable to move.
Just avoid having to press F12. Close and restart your game in test mode instead, or, remove the script until your game is done.
 
if i put that script below the SDK i get an error (same on every script, what script it errors depends on where it is, but its always the same error)

undefined method `update` for nil:NilClass


if i put it above it i get the original error
 

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