RPG Maker Forums

Hi is there a way to change this script to take value for blocking time and blocking coldowns from specified game variable?
Is this really hard to change? 

Code:
#-------------------------------------------------------------------------------# * [ACE] SAS IV Block#-------------------------------------------------------------------------------# * By Khas# * Version: 4.2 EN# * Released on: 24/12/2013##-------------------------------------------------------------------------------# * Terms of Use#-------------------------------------------------------------------------------# Check the terms of use at my blog! Visit the FAQ page.## Blog: arcthunder.blogspot.com# Twitter: twitter.com/arcthunder# Youtube: youtube.com/darkkhas##-------------------------------------------------------------------------------# * Configuration#-------------------------------------------------------------------------------module Block_Core    # Key used to block (default is R, which means W on your keyboard)    Block_Key = Input::Y    # Sprite name  # If the current character sprite is "Adam", when the hero is blocking  # it's sprite will be "Adam_block"  Block_Character_Name = ""    # Sprite index  Block_Character_Index = 0    # Block duration (in frames)  Block_Duration = 20    # Block cooldown (in frames)  Block_Cooldown = 120  end#-------------------------------------------------------------------------------# * Register#-------------------------------------------------------------------------------if $khas_awesome.nil?   $khas_awesome = []endscripts = []$khas_awesome.each { |script| scripts << script[0] }unless scripts.include?("Sapphire Action System")  error = Sprite.new  error.bitmap = Bitmap.new(544,416)  error.bitmap.draw_text(0,208,544,32,"Please install the Sapphire Action System IV",1)  continue = Sprite.new  continue.bitmap = Bitmap.new(544,416)  continue.bitmap.font.color = Color.new(0,255,0)  continue.bitmap.font.size = error.bitmap.font.size - 3  continue.bitmap.draw_text(0,384,544,32,"Press ENTER to exit.",1)  add = Math::PI/80; max = 2*Math::PI; angle = 0  loop do    Graphics.update; Input.update    angle += add; angle %= max    continue.opacity = 185 + 70* Math.cos(angle)    break if Input.trigger?(Input::C)  end  error.bitmap.dispose; continue.bitmap.dispose  error.bitmap = nil; continue.bitmap = nil  error.dispose; continue.dispose  error = nil; continue = nil  exitend$khas_awesome << ["SAS BLOCK",4.2]#-------------------------------------------------------------------------------# * Script#-------------------------------------------------------------------------------class Game_Map    def update_action_system    if Input.trigger?(Input::X)      $game_player.attack    elsif Input.trigger?(Block_Core::Block_Key)      $game_player.block    elsif Input.trigger?(Input::Y)      $game_player.cast_skill    elsif Input.trigger?(Input::Z)      $game_player.next_skill    end  end  endclass Game_Player < Game_Character    alias sasblk_moveto moveto  alias sasblk_update update  alias sasblk_initialize initialize  alias sasblk_damage_hero damage_hero  alias sasblk_skill_damage_hero skill_damage_hero    def initialize    sasblk_initialize    @blocking = false    @block_counter = 0    @block_cooldown = 0  end    def update    sasblk_update    update_block  end    def block    return if @block_cooldown > 0    @block_counter = Block_Core::Block_Duration    @block_cooldown = Block_Core::Block_Cooldown    @blocking = true    @sprite_before_block = @character_name    @index_before_block = @character_index    @character_name = @character_name + Block_Core::Block_Character_Name    @character_index = Block_Core::Block_Character_Index  end    def update_block    if @blocking      if @block_counter > 0        @block_counter -= 1      else        @blocking = false        @character_name = @sprite_before_block        @character_index = @index_before_block      end    end    @block_cooldown -= 1 if @block_cooldown > 0  end    def reset_block    if @blocking      @character_name = @sprite_before_block      @character_index = @index_before_block    end    @block_counter = 0    @block_cooldown = 0    @blocking = false  end    def moveto(x,y)    reset_block    sasblk_moveto(x,y)  end    def damage_hero(d)    @blocking ? $game_map.show_text(self,"Block!") : sasblk_damage_hero(d)  end    def skill_damage_hero(d)    @blocking ? $game_map.show_text(self,"Block!") : sasblk_skill_damage_hero(d)  end  end

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,051
Messages
1,018,551
Members
137,837
Latest member
Dabi
Top