Script Commands Bug Fixes
#2
The conditional branch script command requires the result to specifically be either true or false. Try putting in a number like 12 and you'll see the conditional branch being skipped as well.
Expanding it to work with truthy and falsey values is a good idea ^^

Not a fan of your command_355 fix. Being able to run a script call every frame while it returns a special value can be useful.
Here's a version I did where you can let your script call return :wait to run it again. 
Code:
class Interpreter
  SCRIPT_WAIT_RESULTS = [:wait, FalseClass]
  #--------------------------------------------------------------------------
  # * Script
  #--------------------------------------------------------------------------
  def command_355
    # Set first line to script
    script = @list[@index].parameters[0] + "\n"
    # Store index in case we need to wait.
    current_index = @index
    # Loop
    loop do
      # If next event command is second line of script or after
      if @list[@index+1].code == 655
        # Add second line or after to script
        script += @list[@index+1].parameters[0] + "\n"
      # If event command is not second line or after
      else
        # Abort loop
        break
      end
      # Advance index
      @index += 1
    end
    # Evaluation
    result = eval(script)
    # If return value is false
    if SCRIPT_WAIT_RESULTS.include?(result)
      # Set index back (If multi-line script call)
      @index = current_index
      # End and wait
      return false
    end
    # Continue
    return true
  end
end

*hugs*
 - Zeriab
[Image: ZeriabSig.png]
Reply }


Messages In This Thread
Script Commands Bug Fixes - by kyonides - 02-13-2025, 04:06 AM
RE: Script Commands Bug Fixes - by Zeriab - 02-13-2025, 03:19 PM
RE: Script Commands Bug Fixes - by kyonides - 02-13-2025, 08:35 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
   The Steal and Peep Script DerVVulfman 12 565 02-19-2025, 07:20 AM
Last Post: Ace_V
   Text Scroll Script - Enhanced DerVVulfman 23 36,013 02-18-2021, 04:16 AM
Last Post: DerVVulfman
   Cursor Script Selwyn 7 16,170 09-28-2019, 02:13 PM
Last Post: DerVVulfman
   ACBS FIX SCRIPT #2: Advanced Cry Correction DerVVulfman 1 5,036 08-09-2019, 03:42 PM
Last Post: aeliath
   ACBS FIX SCRIPT #1: Victory Cries Patch DerVVulfman 1 5,112 08-08-2019, 02:53 PM
Last Post: aeliath
   Spritesheet Generator Conversion Script DerVVulfman 0 4,543 11-21-2018, 04:48 AM
Last Post: DerVVulfman
   Event Spawner Fixes DerVVulfman 8 17,729 01-02-2018, 05:48 AM
Last Post: DerVVulfman
   Neo Mode 7 Script by MGCaladtogel MGC 59 129,877 09-29-2017, 03:48 AM
Last Post: DerVVulfman
   Longer Script Calls LiTTleDRAgo 0 5,175 05-17-2017, 12:36 AM
Last Post: LiTTleDRAgo
   SLOLS: Snake Look-alike on Load Script Zeriab 3 11,810 05-14-2017, 06:25 PM
Last Post: LiTTleDRAgo



Users browsing this thread: 2 Guest(s)