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.

GAMEOVER TO HEAVEN SCRIPT DRIVING ME CRAZY!!! PLEASE HELP!!!

I have been creating a game so quite a while now and i have some general knowledge of ruby...but when i try to use the gameOver to heaven script it doesn't seem compatible with the BLIZZ-ABS script....can someone please help me find out how to make these 2 compatible?

here are the game_over to heaven script and the blizz-abs script

Code:
#==============================================================================
# ** Scene_Gameover
#------------------------------------------------------------------------------
#  This class performs game over screen processing.
#==============================================================================

class Scene_Gameover
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
     $game_temp.gameover = false
#     $BLIZZABS.actor.hp = 1
    # Make game over graphic
    @sprite = Sprite.new
   # @sprite.bitmap = RPG::Cache.gameover($data_system.gameover_name)
    # Stop BGM and BGS
    $game_system.bgm_play(nil)
    $game_system.bgs_play(nil)
    # Play game over ME
   # $game_system.me_play($data_system.gameover_me)
    # Execute transition
    Graphics.transition(120)
    # Main loop
    loop do
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    end
    # Prepare for transition
    Graphics.freeze
    # Dispose of game over graphic
    @sprite.bitmap.dispose
    @sprite.dispose
    # Execute transition
    Graphics.transition(40)
    # Prepare for transition
    Graphics.freeze
    # If battle test
    if $BTEST
      $scene = nil
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # If C button was pressed
    if Input.trigger?(Input::C)
     $game_temp.player_transferring = true
     $game_temp.player_new_map_id = "001"#Change this to the map ID
     $game_temp.player_new_x = 5 #This is for the X position
     $game_temp.player_new_y = 5 #This is for the Y postition
#    $game_temp.player_new_direction = up #This is for the direction.
     $scene = Scene_Map.new
     # Loses the 50% (or any value put in $game_system.loss_percentage)
     amount = $game_party.gold * $game_system.loss_percentage
     $game_party.lose_gold(amount.to_i) # To force it to be converted into an integer
     $game_map.autoplay

    end
  end
 
end

class Interpreter
  #--------------------------------------------------------------------------
  # * Game Over
  #--------------------------------------------------------------------------
  def command_353
    # Set game over flag
    $game_temp.gameover = true
    # End
    # Increases the index
    @index += 1
    return false
  end
end

class Game_System
  attr_accessor :loss_percentage
  alias old_game_system_init initialize
  def initialize
    old_game_system_init
    @loss_percentage = 0
  end
end

Code:
################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################

#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Blizz-ABS by Blizzard
# Version: 1.0.9.3
# Type: Advanced Action Battle System
# Date 1.0.0.0: 19.04.2007
# Date 1.0.0.1: 30.04.2007
# Date 1.0.0.2: 17.07.2007
# Date 1.0.0.4: 25.07.2007
# Date 1.0.0.9: 25.07.2007
# Date 1.0.3.0: 29.07.2007
# Date 1.0.3.3: 30.07.2007
# Date 1.0.3.4: 05.08.2007
# Date 1.0.9.0: 05.09.2007
# Date 1.0.9.1: 06.09.2007
# Date 1.0.9.2: 07.09.2007
# Date 1.0.9.3: 11.09.2007
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Explanation:
#
#   This script will allow you to create games with an Action Battle System
#   (ABS) (i.e. Zelda). Action Battle System means real time battle on the map.
#
#   If you don't read the Manual, you will not be able to use many of the great
#   features this ABS supports.
#
#   You didn't get a Manual with the Blizz-ABS? Please e-mail me, tell me where
#   you got this script from and I will give you a download link to the manual.
#   Here is my e-mail:
#   boris_blizzard@yahoo.de
#
#
# Compatibility:
#
#   80% compatible with SDK 1.x. 40% compatible with SDK 2.x. Compatible with
#   any CMS. Mostly is not compatible with any battle add-ons for the normal
#   turn based battle system. WILL corrupt your old save games. Incompatible
#   with the RGSS100J.dll.
#
#
# IMPORTANT:
#
#   Any CMS is being overriden, so put this script UNDER the CMS script if you
#   are using a CMS script (CMS = Custom Menu System). This script overrides
#   Tons of Add-ons and goes under it.
#
#
# Special Thanks for testing to:
#
#   - Leonharts
#   - modern algebra
#   - NAMKCOR
#   - Rune
#   - Irockman1
#   - blazinhandle
#   - Zeph
#
#
# If you find any bugs, please report them here:
# http://www.chaosproject.co.nr
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

#==============================================================================
# BlizzABS
#------------------------------------------------------------------------------
#  This is the master control, configuration, utility and battle process
#  module for Blizz-ABS.
#==============================================================================

module BlizzABS
 
  #============================================================================
  # BlizzABS::Control
  #----------------------------------------------------------------------------
  #  This module provides in-game control configurations.
  #============================================================================
 
  module Control
   
    # using other controls instead of arrow keys
    CUSTOM_CONTROLS = true
    # RMXP default controls will be replaced completely with Blizz-ABS controls
    DISABLE_DEFAULT = true
    # you can skip this if you have set CUSTOM_CONTROLS to false
    # setup the controls as array, but with prefix and suffix "
    # i.e.: Let T and R be for cancel => CANCEL = "[Let['T'], Let['R']]"
    # for more info about read 1.1.1. of the manual
    UP       = "[Let['W']]" # move up
    LEFT     = "[Let['A']]" # move left
    DOWN     = "[Let['S']]" # move down
    RIGHT    = "[Let['D']]" # move right
    PREVPAGE = "[Let['Q']]" # previous page
    NEXTPAGE = "[Let['E']]" # next page
    CONFIRM  = "[Enter]" # confirm selections / pick up items
    CANCEL   = "[Backspace]" # cancel selections
    ATTACK   = "[Let['K']]" # attacking
    DEFEND   = "[Let['L']]" # defending (hold)
    SKILL    = "[Let['J']]" # use skill
    ITEM     = "[Let['I']]" # use item
    SELECT   = "[Let['O']]" # change leader
    HUD      = "[Let['Z']]" # HUD on/off if enabled
    HOTKEY   = "[Let['X']]" # hotkey display on/off if enabled
    MINIMAP  = "[Let['M']]" # toggle minimap mode if enabled
    RUN      = "[Shift]" # running (hold)
    SNEAK    = "[Dot]"      # sneaking (hold)
    JUMP     = "[Space]"    # jumping
    TURN     = "[Let['U']]" # turning around without moving (hold)
  end
 
  #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  # BlizzABS::Config
  #----------------------------------------------------------------------------
  #  This module provides Blizz-ABS configurations.
  #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 
  module Config
   
    # should party members follow the leader on the map
    CATERPILLAR = true
    # how many party member do you use
    MAX_PARTY = 2
    # include all actor IDs who are animated when standing
    ANIMATED_IDS = []
    # 0 -> 32 pixel tiles, 1 -> 16,  2 -> 8, 3 -> 4, 4 -> 2, 5 -> 1
    # careful anything higher than 1 will limit the max speed of char movement
    # 0 - max: 6, 1 - max: 6, 2 - max: 5, 3 - max: 4, 4 - max: 3, 5 - max: 2
    # I recommend using 2 if you have allies else you can use 3
    # note that this can also cause problems with running and sneaking
    PIXEL_MOVEMENT_RATE = 2
    # will make the force movement command ALWAYS work for 32 pixel tiles
    REPAIR_MOVEMENT = true
    # enable or disable moving in all 8 directions
    EIGHT_WAY_MOVEMENT = true
    # the normal moving speed (4 is default)
    NORMAL_SPEED = 4
    # the speed of running (set to 0 to disable)
    RUN_SPEED = 5
    # the speed of sneaking (set to 0 to disable)
    SNEAK_SPEED = 3
    # how many squares should the player jump (set to 0 to disable)
    JUMPING = 20
    # the terrain tag of tiles where the player can't jump over
    JUMP_TAG = 8
    # measured in map squares
    PERCEPTION_RANGE = 5
    # the terrain tag of "walls" (enemies can't see through walls, only hear)
    WALL_TAG = 8
    # turns HUD on or off
    HUD_ENABLED = true
    # 0, 1, or 2 (slightly different drawing method of the bars)
    HUD_TYPE = 0
    # 0 = upper left corner, 1 = upper right corner
    HUD_POSITION = 0
    # enables minimap
    MINIMAP = true
    # enables intelligent minimap to save map loading time
    INTELLIGENT_PASSABILTY = true
    # how much time will pass until an enemy respawns (0 for no respawn)
    RESPAWN_TIME = 0
    # the terrain tag of tiles where enemies can't respawn
    NO_ENEMY_TAG = 8
    # how many seconds will dropped stuff stay (0xFFFF for "infinite")
    ITEM_TIME = 1800
    # sound played when picking up items ("NAME", VOLUME, PITCH)
    ITEM_PICKUP_SOUND_FILE = RPG::AudioFile.new('056-Right02', 80, 100)
    # makes enemies drop gold, specify an icon for display here
    DROP_GOLD = ''
    # map IDs where ABSEAL is disabled
    DISABLE_ANTI_LAG_IDS = []
    # strength of delag (1 is most powerful and not recommended)
    FACTOR = 2
    # stops update of events with no spriteset
    ABSEAL_AUTOKILL = true
    # restores the character's HP/SP/Status on Level Up
    HEAL_ON_LVLUP = true
    # displays LvUp on Level Up
    DISPLAY_LVLUP = true
    # animation ID of the animation shown when a player levels up
    LVLUP_ANIMATION_ID = 0
    # animation ID of the animation shown when an enemy is on the run
    FLEE_LOOP_ANIMATION_ID = 0
    # shows attack/skill/item animation
    ANIMATIONS = true
    # enables or disables the sprites during action of for actors
    ACTOR_ACTION_SPRITES = true
    # enables or disables the sprites during action of enemies
    ENEMY_ACTION_SPRITES = true
    # enables or disables the extra sprites for each weapon (actors only)
    WEAPON_SPRITES = true
    # enables or disables the sprites during running (player and allies)
    RUNNING_SPRITES = false
    # enables or disables the sprites during sneaking (player and allies)
    SNEAKING_SPRITES = false
    # enables or disables the sprites during sneaking (player and allies)
    JUMPING_SPRITES = false
    # small animations (set to true to size animations down to 50%)
    SMALL_ANIMATIONS = true
    # use also different tint colors for the pre-menu
    MENU_COLOR_TINT = 0
    # attack sprite (for actors), first row y offset if necessary
    ACTOR_SPRITE_Y_OFFSET = 0
    # attack sprite (for enemies), first row y offset if necessary
    ENEMY_SPRITE_Y_OFFSET = 0
    # 0 = never, 1 = no enemies, 2 = enemies dead, 3 = enemies within ABSEAL dead
    DISABLE_ABS_MODE = 0
    # [type, range], 0 = no data, 1 = in name, 2 = in description
    WEAPON_DATA_MODE = [0, 0]
    # [type, explode range, range] 0 = no data, 1 = in name, 2 = in description
    SKILL_DATA_MODE = [0, 0, 0]
    # [type, explode range, range] 0 = no data, 1 = in name, 2 = in description
    ITEM_DATA_MODE = [0, 0, 0]
  end
 
  #============================================================================
  # BlizzABS::Weapons
  #----------------------------------------------------------------------------
  #  This module provides weapon configurations.
  #============================================================================
 
  module Weapons
   
    #--------------------------------------------------------------------------
    # type
    #  id - weapon ID
    #  This method serves as database for weapon types.
    #  0 = sword / axe / claws / unarmed / etc. (damages in close front)
    #  1 = spear / lance (damages only in front)
    #  2 = flail (distant weapon, does not damage close enemies, front)
    #  3 = boomerang (returning projectile weapon, front)
    #  4 = bow and arrows / gun / shuriken (non-returning projectile, NO consumption)
    #  5 = bow and arrows / gun (non-returning projectile, consumes AMMUNITION)
    #  6 = shuriken (non-returning projectile, consumes ITSELF)
    #--------------------------------------------------------------------------
    def self.type(id)
      case id
      # START set up weapon types (when ID then return TYPE)
      when 1 then return 0
      # END
      end
      return 0
    end
    #--------------------------------------------------------------------------
    # range
    #  id - weapon ID
    #  This method serves as database for weapon ranges. All ranges are
    #  measured in map squares. Any decimal value WILL have its effect if
    #  pixel movement is being used.
    #--------------------------------------------------------------------------
    def self.range(id)
      case id
      # START set up weapon ranges (when ID then return RANGE)
      when 1 then return 1.5
      # END
      end
      return 1.5
    end
    #--------------------------------------------------------------------------
    # consume
    #  id - weapon ID
    #  Lets your weapons consume items to work. You must have the item assigned
    #  as your hot item for the weapon to work. One weapon can consumes
    #  different items. If you don't have any items left, the attack will fail.
    #  Allies' items for usage can be set up directly or over the AI menu.
    #--------------------------------------------------------------------------
    def self.consume(id)
      case id
      # START set up ammo consumption (when ID then return ID_ARRAY)
      when 1 then return []
      # END
      end
      return []
    end
  end
 
  #============================================================================
  # BlizzABS::Skills
  #----------------------------------------------------------------------------
  #  This module provides skill configurations.
  #============================================================================
 
  module Skills
   
    #--------------------------------------------------------------------------
    # type
    #  id - skill ID
    #  Lets you define how skills will be executed.
    #   0 = shooting skills (projectile skill, hits first target it encounters)
    #   1 = thrusting skills (projectile skill, hits every target it goes through)
    #   2 = homing skills (projectile skill, finds the target you specify)
    #   3 = beam skills (hits every target it goes through instantly)
    #   4 = direct skills (hits the target instantly, you select the target)
    #  If a skill targets all enemies/allies, the skill will turn into:
    #   0-1 => shockwave skills (shockwave hits all targets on the screen)
    #   2   => superhoming skills (projectiles hit all targets in range)
    #   3-4 => fullscreen skills (targets all actors or enemies on the screen)
    #  Set the exploding range to 0 if you don't want anybody around to be
    #  affected by this skill. A skill explosion does not differ between ally
    #  and enemy. The animation ID can be skipped if no explosion range was
    #  defined.
    #--------------------------------------------------------------------------
    def self.type(id)
      case id
      # START set up skill types (when ID then return [TYPE, EXPLODING_RANGE, ANIMATION_ID])
      when 1 then return [4, 0]
      # END
      end
      return [4, 0]
    end
    #--------------------------------------------------------------------------
    # range
    #  id - skill ID
    #  This method serves as database for skill ranges. All ranges are
    #  measured in map squares. Any decimal value WILL have its effect if
    #  pixel movement is being used. If the skill is a summon skill, this will
    #  define the time in seconds how long the summoned ally will prevail.
    #--------------------------------------------------------------------------
    def self.range(id)
      case id
      # START set up skill ranges (when ID then return RANGE)
      when 1 then return 5.5
      # END
      end
      return 5.5
    end
  end
 
  #============================================================================
  # BlizzABS::Items
  #----------------------------------------------------------------------------
  #  This module provides item configurations.
  #============================================================================
 
  module Items
   
    #--------------------------------------------------------------------------
    # type
    #  id - item ID
    #  Lets you define how skills will be executed.
    #   0 = shooting items (projectile item, hits first target it encounters)
    #   1 = thrusting items (projectile item, hits every target it goes through)
    #   2 = homing items (projectile item, finds the target you specify)
    #   3 = beam items (hits every target it goes through instantly)
    #   4 = direct items (hits the target instantly, you select the target)
    #  If an item targets all enemies/allies, the item will turn into:
    #   0-1 => shockwave items (shockwave hits all targets on the screen)
    #   2   => superhoming items (projectiles hit all targets in range)
    #   3-4 => fullscreen items (targets all actors or enemies on the screen)
    #  Set the exploding range to 0 if you don't want anybody around to be
    #  affected by this item. An item explosion does not differ between ally
    #  and enemy.
    #--------------------------------------------------------------------------
    def self.type(id)
      case id
      # START set up skill types (when ID then return [TYPE, EXPLODING_RANGE, ANIMATION_ID])
      when 1 then return [4, 0]
      # END
      end
      return [4, 0]
    end
    #--------------------------------------------------------------------------
    # range
    #  id - item ID
    #  This method serves as database for item ranges. All ranges are
    #  measured in map squares. Any decimal value WILL have its effect if
    #  pixel movement is being used. If the item is a summon item, this will
    #  define the time in seconds how long the summoned ally will prevail.
    #--------------------------------------------------------------------------
    def self.range(id)
      case id
      # START set up item ranges (when ID then return RANGE)
      when 1 then return 5.5
      # END
      end
      return 5.5
    end
  end
 
  #============================================================================
  # BlizzABS::Enemies
  #----------------------------------------------------------------------------
  #  This module provides special enemy configurations.
  #============================================================================
 
  module Enemies
   
    #--------------------------------------------------------------------------
    # type
    #  id - enemy ID
    #  This method serves as database for enemy attack types.
    #  0 = damages in close front
    #  1 = damages only in front
    #  2 = distant weapon, does not damage close enemies, front
    #  3 = returning projectile weapon, front
    #  4 = projectile weapon
    #--------------------------------------------------------------------------
    def self.type(id)
      case id
      # START set up enemy attack types (when ID then return TYPE)
      when 1 then return 1
      # END
      end
      return 0
    end
    #--------------------------------------------------------------------------
    # range
    #  id - enemy ID
    #  This method serves as database for enemy attack ranges. All ranges are
    #  measured in map squares. Any decimal value WILL have its effect if
    #  pixel movement is being used.
    #--------------------------------------------------------------------------
    def self.range(id)
      case id
      # START set up enemy attack ranges (when ID then return RANGE)
      when 1 then return 1.5
      # END
      end
      return 1.5
    end
    #--------------------------------------------------------------------------
    # enemy_set
    #  id - enemy ID
    #  Specify spritesets for enemy projectile attacks. Spritesets are
    #  auto-animated all the time.
    #--------------------------------------------------------------------------
    def self.enemy_set(id)
      case id
      # START set up enemy attack spritesets (when ID then return SPRITESET_NAME)
      when 1 then return ''
      # END
      end
      return ''
    end
  end
 
  #============================================================================
  # BlizzABS::Cache
  #----------------------------------------------------------------------------
  #  This module holds a few bitmaps, so they don't need to be drawn each time
  #  which improves speed and reduces lag. It also holds damage sprites and
  #  Projectile Characters.
  #============================================================================
 
  module Cache
   
    #--------------------------------------------------------------------------
    # load
    #  Loads the cache images.
    #--------------------------------------------------------------------------
    def self.load
      # initialize
      @data = []
      # add image
      @data.push(self._green_arrow)
      # prevent "Script is hanging" error
      Graphics.update
      # add image
      @data.push(self._white_arrow)
      # prevent "Script is hanging" error
      Graphics.update
      # add image
      @data.push(self._arrow)
      # prevent "Script is hanging" error
      Graphics.update
      # add image
      @data.push(self._minimap_autotile)
      # prevent "Script is hanging" error
      Graphics.update
      # create damage sprite buffer and projectile buffer
      @damages, @projectiles = [], []
    end
    #--------------------------------------------------------------------------
    # damages
    #  Returns all currently displayed damage sprites.
    #--------------------------------------------------------------------------
    def self.damages
      return @damages
    end
    #--------------------------------------------------------------------------
    # projectiles
    #  Returns all currently active projectiles.
    #--------------------------------------------------------------------------
    def self.projectiles
      return @projectiles
    end
    #--------------------------------------------------------------------------
    # clean
    #  Cleans the cache from projectiles and damage sprites.
    #--------------------------------------------------------------------------
    def self.clean
      # disposes all damage sprites
      @damages.each {|ary| ary[0].dispose}
      # create new damage sprite buffer and new projectile buffer
      @damages, @projectiles = [], []
      # unfreeze all actor's actions
      BlizzABS.player.actors.each {|actor| actor.freeze_action = false}
    end
    #--------------------------------------------------------------------------
    # image
    #  index - index of the image in the cache
    #  Returns a copy of the image.
    #--------------------------------------------------------------------------
    def self.image(index)
      return @data[index].clone
    end
    #--------------------------------------------------------------------------
    # _green_arrow
    #  Creates the minimap icon for events.
    #--------------------------------------------------------------------------
    def self._green_arrow
      b = Bitmap.new(56, 14)
      c1 = Color.new(0, 0, 0)
      c2 = Color.new(255, 255, 255)
      c3 = Color.new(0, 255, 0)
      b.set_pixel(23, 0, c1)
      b.set_pixel(32, 0, c1)
      b.set_pixel(22, 1, c1)
      b.fill_rect(23, 1, 1, 12, c3)
      b.fill_rect(24, 1, 1, 12, c1)
      b.fill_rect(31, 1, 1, 12, c1)
      b.fill_rect(32, 1, 1, 12, c3)
      b.set_pixel(33, 1, c1)
      b.set_pixel(21, 2, c1)
      b.fill_rect(22, 2, 1, 10, c3)
      b.fill_rect(33, 2, 1, 10, c3)
      b.set_pixel(34, 2, c1)
      b.fill_rect(1, 3, 12, 1, c1)
      b.set_pixel(20, 3, c1)
      b.fill_rect(21, 3, 1, 8, c3)
      b.fill_rect(34, 3, 1, 8, c3)
      b.set_pixel(35, 3, c1)
      b.fill_rect(48, 3, 2, 1, c1)
      b.set_pixel(0, 4, c1)
      b.fill_rect(1, 4, 12, 1, c3)
      b.set_pixel(13, 4, c1)
      b.set_pixel(19, 4, c1)
      b.fill_rect(20, 4, 1, 6, c3)
      b.fill_rect(35, 4, 1, 6, c3)
      b.set_pixel(36, 4, c1)
      b.set_pixel(47, 4, c1)
      b.fill_rect(48, 4, 2, 6, c3)
      b.set_pixel(50, 4, c1)
      b.set_pixel(1, 5, c1)
      b.fill_rect(2, 5, 10, 1, c3)
      b.set_pixel(12, 5, c1)
      b.set_pixel(18, 5, c1)
      b.fill_rect(19, 5, 1, 4, c3)
      b.fill_rect(36, 5, 1, 4, c3)
      b.set_pixel(37, 5, c1)
      b.set_pixel(46, 5, c1)
      b.fill_rect(47, 5, 1, 5, c3)
      b.fill_rect(50, 5, 1, 5, c3)
      b.set_pixel(51, 5, c1)
      b.set_pixel(2, 6, c1)
      b.fill_rect(3, 6, 8, 1, c3)
      b.set_pixel(11, 6, c1)
      b.fill_rect(17, 6, 1, 2, c1)
      b.fill_rect(18, 6, 1, 2, c3)
      b.fill_rect(37, 6, 1, 2, c3)
      b.fill_rect(38, 6, 1, 2, c1)
      b.set_pixel(45, 6, c1)
      b.fill_rect(46, 6, 1, 4, c3)
      b.fill_rect(51, 6, 1, 4, c3)
      b.set_pixel(52, 6, c1)
      b.set_pixel(3, 7, c1)
      b.fill_rect(4, 7, 6, 1, c3)
      b.set_pixel(10, 7, c1)
      b.set_pixel(44, 7, c1)
      b.fill_rect(45, 7, 1, 3, c3)
      b.fill_rect(52, 7, 1, 3, c3)
      b.set_pixel(53, 7, c1)
      b.set_pixel(4, 8, c1)
      b.fill_rect(5, 8, 4, 1, c3)
      b.set_pixel(9, 8, c1)
      b.set_pixel(18, 8, c1)
      b.set_pixel(37, 8, c1)
      b.set_pixel(43, 8, c1)
      b.fill_rect(44, 8, 1, 2, c3)
      b.fill_rect(53, 8, 1, 2, c3)
      b.set_pixel(54, 8, c1)
      b.set_pixel(5, 9, c1)
      b.fill_rect(6, 9, 2, 1, c3)
      b.set_pixel(8, 9, c1)
      b.set_pixel(19, 9, c1)
      b.set_pixel(36, 9, c1)
      b.set_pixel(42, 9, c1)
      b.set_pixel(43, 9, c3)
      b.set_pixel(54, 9, c3)
      b.set_pixel(55, 9, c1)
      b.fill_rect(6, 10, 2, 1, c1)
      b.set_pixel(20, 10, c1)
      b.set_pixel(35, 10, c1)
      b.fill_rect(43, 10, 12, 1, c1)
      b.set_pixel(21, 11, c1)
      b.set_pixel(34, 11, c1)
      b.set_pixel(22, 12, c1)
      b.set_pixel(33, 12, c1)
      b.set_pixel(23, 13, c1)
      b.set_pixel(32, 13, c1)
      return b
    end
    #--------------------------------------------------------------------------
    # _white_arrow
    #  Creates the minimap icon for other events.
    #--------------------------------------------------------------------------
    def self._white_arrow
      b = Bitmap.new(56, 14)
      c1 = Color.new(0, 0, 0)
      c2 = Color.new(255, 255, 255)
      b.set_pixel(23, 0, c1)
      b.set_pixel(32, 0, c1)
      b.set_pixel(22, 1, c1)
      b.fill_rect(23, 1, 1, 12, c2)
      b.fill_rect(24, 1, 1, 12, c1)
      b.fill_rect(31, 1, 1, 12, c1)
      b.fill_rect(32, 1, 1, 12, c2)
      b.set_pixel(33, 1, c1)
      b.set_pixel(21, 2, c1)
      b.fill_rect(22, 2, 1, 10, c2)
      b.fill_rect(33, 2, 1, 10, c2)
      b.set_pixel(34, 2, c1)
      b.fill_rect(1, 3, 12, 1, c1)
      b.set_pixel(20, 3, c1)
      b.fill_rect(21, 3, 1, 8, c2)
      b.fill_rect(34, 3, 1, 8, c2)
      b.set_pixel(35, 3, c1)
      b.fill_rect(48, 3, 2, 1, c1)
      b.set_pixel(0, 4, c1)
      b.fill_rect(1, 4, 12, 1, c2)
      b.set_pixel(13, 4, c1)
      b.set_pixel(19, 4, c1)
      b.fill_rect(20, 4, 1, 6, c2)
      b.fill_rect(35, 4, 1, 6, c2)
      b.set_pixel(36, 4, c1)
      b.set_pixel(47, 4, c1)
      b.fill_rect(48, 4, 2, 6, c2)
      b.set_pixel(50, 4, c1)
      b.set_pixel(1, 5, c1)
      b.fill_rect(2, 5, 10, 1, c2)
      b.set_pixel(12, 5, c1)
      b.set_pixel(18, 5, c1)
      b.fill_rect(19, 5, 1, 4, c2)
      b.fill_rect(36, 5, 1, 4, c2)
      b.set_pixel(37, 5, c1)
      b.set_pixel(46, 5, c1)
      b.fill_rect(47, 5, 1, 5, c2)
      b.fill_rect(50, 5, 1, 5, c2)
      b.set_pixel(51, 5, c1)
      b.set_pixel(2, 6, c1)
      b.fill_rect(3, 6, 8, 1, c2)
      b.set_pixel(11, 6, c1)
      b.fill_rect(17, 6, 1, 2, c1)
      b.fill_rect(18, 6, 1, 2, c2)
      b.fill_rect(37, 6, 1, 2, c2)
      b.fill_rect(38, 6, 1, 2, c1)
      b.set_pixel(45, 6, c1)
      b.fill_rect(46, 6, 1, 4, c2)
      b.fill_rect(51, 6, 1, 4, c2)
      b.set_pixel(52, 6, c1)
      b.set_pixel(3, 7, c1)
      b.fill_rect(4, 7, 6, 1, c2)
      b.set_pixel(10, 7, c1)
      b.set_pixel(44, 7, c1)
      b.fill_rect(45, 7, 1, 3, c2)
      b.fill_rect(52, 7, 1, 3, c2)
      b.set_pixel(53, 7, c1)
      b.set_pixel(4, 8, c1)
      b.fill_rect(5, 8, 4, 1, c2)
      b.set_pixel(9, 8, c1)
      b.set_pixel(18, 8, c1)
      b.set_pixel(37, 8, c1)
      b.set_pixel(43, 8, c1)
      b.fill_rect(44, 8, 1, 2, c2)
      b.fill_rect(53, 8, 1, 2, c2)
      b.set_pixel(54, 8, c1)
      b.set_pixel(5, 9, c1)
      b.fill_rect(6, 9, 2, 1, c2)
      b.set_pixel(8, 9, c1)
      b.set_pixel(19, 9, c1)
      b.set_pixel(36, 9, c1)
      b.set_pixel(42, 9, c1)
      b.set_pixel(43, 9, c2)
      b.set_pixel(54, 9, c2)
      b.set_pixel(55, 9, c1)
      b.fill_rect(6, 10, 2, 1, c1)
      b.set_pixel(20, 10, c1)
      b.set_pixel(35, 10, c1)
      b.fill_rect(43, 10, 12, 1, c1)
      b.set_pixel(21, 11, c1)
      b.set_pixel(34, 11, c1)
      b.set_pixel(22, 12, c1)
      b.set_pixel(33, 12, c1)
      b.set_pixel(23, 13, c1)
      b.set_pixel(32, 13, c1)
      return b
    end
    #--------------------------------------------------------------------------
    # _arrow
    #  Creates the arrow displayed in the hotkey assignment menu.
    #--------------------------------------------------------------------------
    def self._arrow
      b = Bitmap.new(16, 9)
      c1 = Color.new(0, 0, 0)
      c2 = Color.new(255, 255, 255)
      c3 = Color.new(127, 127, 127)
      b.fill_rect(7, 0, 2, 1, c2)
      b.set_pixel(6, 1, c2)
      b.fill_rect(7, 1, 1, 7, c3)
      b.fill_rect(8, 1, 1, 7, c1)
      b.set_pixel(9, 1, c2)
      b.set_pixel(5, 2, c2)
      b.fill_rect(6, 2, 1, 6, c3)
      b.fill_rect(9, 2, 1, 6, c1)
      b.set_pixel(10, 2, c2)
      b.set_pixel(4, 3, c2)
      b.fill_rect(5, 3, 1, 5, c3)
      b.fill_rect(10, 3, 1, 5, c1)
      b.set_pixel(11, 3, c2)
      b.set_pixel(3, 4, c2)
      b.fill_rect(4, 4, 1, 4, c3)
      b.fill_rect(11, 4, 1, 4, c1)
      b.set_pixel(12, 4, c2)
      b.set_pixel(2, 5, c2)
      b.fill_rect(3, 5, 1, 3, c3)
      b.fill_rect(12, 5, 1, 3, c1)
      b.set_pixel(13, 5, c2)
      b.set_pixel(1, 6, c2)
      b.fill_rect(2, 6, 1, 2, c3)
      b.fill_rect(13, 6, 1, 2, c1)
      b.set_pixel(14, 6, c2)
      b.set_pixel(0, 7, c2)
      b.set_pixel(1, 7, c3)
      b.set_pixel(14, 7, c1)
      b.set_pixel(15, 7, c2)
      b.fill_rect(1, 8, 14, 1, c2)
      return b
    end
    #--------------------------------------------------------------------------
    # _minimap_autotile
    #  Creates the minimap autotile for passability.
    #--------------------------------------------------------------------------
    def self._minimap_autotile
      b = Bitmap.new(24, 32)
      c1 = Color.new(191, 191, 191)
      c2 = Color.new(255, 255, 255)
      b.fill_rect(2, 0, 4, 1, c2)
      b.set_pixel(1, 1, c2)
      b.fill_rect(2, 1, 4, 6, c1)
      b.set_pixel(6, 1, c2)
      b.fill_rect(0, 2, 1, 4, c2)
      b.fill_rect(1, 2, 1, 4, c1)
      b.fill_rect(6, 2, 1, 4, c1)
      b.fill_rect(7, 2, 1, 4, c2)
      b.set_pixel(1, 6, c2)
      b.set_pixel(6, 6, c2)
      b.fill_rect(2, 7, 4, 1, c2)
      b.fill_rect(7, 8, 10, 1, c2)
      b.set_pixel(6, 9, c2)
      b.fill_rect(7, 9, 10, 22, c1)
      b.set_pixel(17, 9, c2)
      b.set_pixel(5, 10, c2)
      b.fill_rect(6, 10, 1, 20, c1)
      b.fill_rect(17, 10, 1, 20, c1)
      b.set_pixel(18, 10, c2)
      b.set_pixel(4, 11, c2)
      b.fill_rect(5, 11, 1, 18, c1)
      b.fill_rect(18, 11, 1, 18, c1)
      b.set_pixel(19, 11, c2)
      b.set_pixel(3, 12, c2)
      b.fill_rect(4, 12, 1, 16, c1)
      b.fill_rect(19, 12, 1, 16, c1)
      b.set_pixel(20, 12, c2)
      b.set_pixel(2, 13, c2)
      b.fill_rect(3, 13, 1, 14, c1)
      b.fill_rect(20, 13, 1, 14, c1)
      b.set_pixel(21, 13, c2)
      b.set_pixel(1, 14, c2)
      b.fill_rect(2, 14, 1, 12, c1)
      b.fill_rect(21, 14, 1, 12, c1)
      b.set_pixel(22, 14, c2)
      b.fill_rect(0, 15, 1, 10, c2)
      b.fill_rect(1, 15, 1, 10, c1)
      b.fill_rect(22, 15, 1, 10, c1)
      b.fill_rect(23, 15, 1, 10, c2)
      b.set_pixel(1, 25, c2)
      b.set_pixel(22, 25, c2)
      b.set_pixel(2, 26, c2)
      b.set_pixel(21, 26, c2)
      b.set_pixel(3, 27, c2)
      b.set_pixel(20, 27, c2)
      b.set_pixel(4, 28, c2)
      b.set_pixel(19, 28, c2)
      b.set_pixel(5, 29, c2)
      b.set_pixel(18, 29, c2)
      b.set_pixel(6, 30, c2)
      b.set_pixel(17, 30, c2)
      b.fill_rect(7, 31, 10, 1, c2)
      return b
    end
  end
 
  #============================================================================
  # Player_Controller
  #----------------------------------------------------------------------------
  #  This class is a special controller that controls the party leader.
  #============================================================================
 
  class Player_Controller
   
    # Center screen x-coordinate * 4
    CX = (320 - 16) * 4
    # Center screen y-coordinate * 4
    CY = (240 - 16) * 4
   
    # set all accessable variables
    attr_accessor :normal_speed
    attr_accessor :actors
    #--------------------------------------------------------------------------
    # Initialization
    #--------------------------------------------------------------------------
    def initialize
      # set event trigger escape counter
      @evented = 0
      # set actor characters
      @actors = []
      # set memory jump
      @memory_jump = false
      # set normal speed
      @normal_speed = BlizzABS::Config::NORMAL_SPEED
    end
    #--------------------------------------------------------------------------
    # player
    #  This method is used to make the code easier to read.
    #--------------------------------------------------------------------------
    def player
      return @actors[0]
    end
    #--------------------------------------------------------------------------
    # update_control
    #  Processes player control.
    #--------------------------------------------------------------------------
    def update_control
      # get pixel movement rate
      pix = BlizzABS.pixel
      # reset move speed
      player.move_speed = @normal_speed
      # reset spriteset name
      player.character_name = player.character_name_org
      # if allowed to change speed
      unless $game_system.map_interpreter.running? ||
          player.move_route_forcing || $game_temp.message_window_showing
        # if run button works and running
        if Input.press?(Input::Run) && BlizzABS::Config::RUN_SPEED != 0
          # set running speed
          player.move_speed = BlizzABS::Config::RUN_SPEED
        # if sneak button works and sneaking
        elsif Input.press?(Input::Sneak) && BlizzABS::Config::SNEAK_SPEED != 0
          # set sneaking speed
          player.move_speed = BlizzABS::Config::SNEAK_SPEED
        end
      end
      # if battler exists and either dead or select triggered
      if player.battler != nil && (Input.trigger?(Input::Select) ||
          player.battler.dead?)
        # iterate "number of party members" times
        $game_party.actors.size.times {
            # change party leader
            $game_party.add_actor($game_party.actors.shift.id)
            # until finding one who's not dead
            break if $game_party.actors[0] != nil && !$game_party.actors[0].dead?}
        # center screen display on new player controlled character
        center(player.x, player.y, true)
        # enforce emptying moving buffer and add special command
        update_buffer(false)
      end
      # update spriteset animation
      player.sprite_update
      # decrease event trigger escape counter if no interpreter running
      @evented -= 1 if @evented > 0 && !$game_system.map_interpreter.running?
      # if allowed to turn and pressed turning button or defending
      if ((player.defending && player.attacked == 0 &&
            player.in_action == 0) || Input.press?(Input::Turn)) &&
            !player.moving? && !$game_system.map_interpreter.running? &&
            !player.move_route_forcing && !$game_temp.message_window_showing
        # straighten
        player.straighten
        # depending on input turn
        case Input.dir4
        when 2 then player.turn_down
        when 4 then player.turn_left
        when 6 then player.turn_right
        when 8 then player.turn_up
        end
        # updates any attack action
        player.update_attacked
        # abort method
        return nil
      end
      # updates any attack action
      player.update_attacked
      # if acting
      if player.in_action > 0
        # decrease action counter if in_action is greater than 0
        player.in_action -= 1 if player.in_action > 0
        # return data
        return [player.moving?, player.real_x, player.real_y]
      end
      # if allowed to move
      unless $game_system.map_interpreter.running? ||
          player.move_route_forcing || $game_temp.message_window_showing
        # if jump button was pressed and not already jumping
        @memory_jump = true if Input.trigger?(Input::Jump) && !player.jumping?
        # if not moving
        unless player.moving?
          # get jumping range
          range = BlizzABS::Config::JUMPING
          # if jumping turned on and not jumping and jumped
          if range > 0 && !player.jumping? && @memory_jump
            # if sneaking or running is possible
            if BlizzABS::Config::RUN_SPEED > 0 || BlizzABS::Config::SNEAK_SPEED > 0
              # get difference between current speed and normal speed
              dplus = player.move_speed - @normal_speed
            else
              # difference is 0
              dplus = 0
            end
            # check input
            direction = ($game_system._8_way ? Input.dir8 : Input.dir4)
            # set jumping direction
            case direction
            when 1 then x, y = -1, 1
            when 2 then x, y = 0, 1
            when 3 then x, y = 1, 1
            when 4 then x, y = -1, 0
            when 6 then x, y = 1, 0
            when 7 then x, y = -1, -1
            when 8 then x, y = 0, -1
            when 9 then x, y = 1, -1
            else
              x, y = 0, 0
            end
            # jump into direction with considering running/sneaking
            player.jump(x*range + x*dplus, y*range + y*dplus, direction)
          elsif !player.jumping?
            # check input and attempt to move
            case ($game_system._8_way ? Input.dir8 : Input.dir4)
            when 1 then move(4) if !move(1) && !move(2)
            when 2 then move(2)
            when 3 then move(6) if !move(3) && !move(2)
            when 4 then move(4)
            when 6 then move(6)
            when 7 then move(4) if !move(7) && !move(8)
            when 8 then move(8)
            when 9 then move(6) if !move(9) && !move(8)
            end
          end
          # not jumping anymore
          @memory_jump = false
        end
      end
      # return data
      return [player.moving?, player.real_x, player.real_y]
    end
    #--------------------------------------------------------------------------
    # move
    #  dir - direction
    #  This method is used to make the code easier to read. It moves the player
    #--------------------------------------------------------------------------
    def move(dir)
      return case dir
      when 1 then player.move_lower_left
      when 2 then player.move_down
      when 3 then player.move_lower_right
      when 4 then player.move_left
      when 6 then player.move_right
      when 7 then player.move_upper_left
      when 8 then player.move_up
      when 9 then player.move_upper_right
      end
    end
    #--------------------------------------------------------------------------
    # update_move
    #  Processes player control.
    #--------------------------------------------------------------------------
    def update_move(data)
      # if control update was not aborted
      if data != nil
        # if moved down
        if player.real_y > data[2] && player.real_y - $game_map.display_y > CY
          # scroll screen down
          $game_map.scroll_down(player.real_y - data[2])
        end
        # if moved left
        if player.real_x < data[1] && player.real_x - $game_map.display_x < CX
          # scroll screen left
          $game_map.scroll_left(data[1] - player.real_x)
        end
        # if moved right
        if player.real_x > data[1] && player.real_x - $game_map.display_x > CX
          # scroll screen right
          $game_map.scroll_right(player.real_x - data[1])
        end
        # if moved up
        if player.real_y < data[2] && player.real_y - $game_map.display_y < CY
          # scroll screen up
          $game_map.scroll_up(data[2] - player.real_y)
        end
        # if not moving
        unless player.moving?
          # if was moving before and event escape expired and event not triggered
          if data[0] && @evented == 0 && check_event_trigger_here([1, 2])
            # set event trigger escape counter to one second
            @evented = 40
          end
          # if pressed C button
          if Input.trigger?(Input::C)
            # check event here
            check_event_trigger_here([0])
            # check event there
            check_event_trigger_there([0, 1, 2])
          end
        end
      end
      # update actors' characters
      update_actors
      # update ABS controls
      $game_system.controls.update
    end
    #--------------------------------------------------------------------------
    # update_buffer
    #  move - new command
    #  Updates the buffer of the last moving commands.
    #--------------------------------------------------------------------------
    def update_buffer(move)
      # empty each actor's buffer if new command requires so
      @actors.each {|actor| actor.buffer = []} if [nil, false].include?(move)
      # add new command or enforce emptying whether move is reset for each actor
      @actors.each {|actor| actor.update_buffer(move == 'reset' ? nil : move)}
    end
 
Code:
$game_temp.player_new_direction = up #This is for the direction.
Are you sure this will work? Normally you use 2, 4, 6 and 8 for directions (look at a numpad to see why).

Soo... what's not working? Are you simply getting a normal game over, or do you get an error message?
 
I documented out that line of code so i didn't have to worry about it.

It seems to conflict with the BLIZZ-ABS code's "Passability checker".

I will post the exact error message that i get when i get back home...
Because i do not have the program with me at this time...
 

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