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.

Wait for Move Completion fix

SG Wait for Move Completion Fix
Version: 1

Introduction

This fixes "Wait for Move Completion". Without this script, if you assigned something a move route and told it to repeat (even if it was in other events), your game would hang when you used this command.

No more need for silly workarounds :)

Script

Code:
[CODE]#==========================================================================
# ** SG Wait for Move Completion Fix
#==========================================================================
# sandgolem 
# Version 1
# 22.07.06
#==========================================================================
#
# To use this script, copy it and insert it in a new section above "Main",
# but under the default scripts and the SDK if you're using it.
#
#==========================================================================

begin
  SDK.log('SG Wait for Move Completion Fix', 'sandgolem', 1, '22.07.06')
  if SDK.state('SG Wait for Move Completion Fix') != true
    @sg_completionfix_disabled = true
  end
  rescue
end

if !@sg_completionfix_disabled
#--------------------------------------------------------------------------

class Game_Character
  attr_accessor :sg_move_fix
  
  alias sandgolem_completionfix_character_forcemr force_move_route
  def force_move_route(move_route)
    @sg_move_fix = nil
    sandgolem_completionfix_character_forcemr(move_route)
  end
  
  alias sandgolem_completionfix_character_mtcustom move_type_custom
  def move_type_custom
    if @move_route.list[@move_route_index].code == 0
      @sg_move_fix = true
    end
    sandgolem_completionfix_character_mtcustom
  end
end

#--------------------------------------------------------------------------
end
[/code]

Instructions

Insert the script under the defaults, above Main. You'll also be required to do some editing to the Interpreter class:

Note: Interpreter editing is generally for advanced scripters only. Don't get tempted to add more stuff to it without knowing what you're doing

Search and Find (in Interpreter 1):

Code:
if event.move_route_forcing
This should be a line in the 150's somewhere.

Replace it with:

Code:
if event.move_route_forcing && !event.sg_move_fix
Happy RMXPing :) If you know any other bugs that should be fixed, let me know and I might.
 

Shiro

Member

Wait for Move Completion was both the greatest and most annoying function ever. I'm glad you've done this so I now no longer have to do crazy workarounds just to get the function to work (or opting for the wait command which isn't always the best thing to do when you're waiting for complex movements to end)

Thanks a lot SandGolem, it's very helpful :)
 
This should greatly help those small bugs, To bad Enterbrain didn't fix them theirselves. nice job Sandgolem, yet another handy and useful script by you.
 

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