[XP] Blizz-ABS

Started by Blizzard, January 09, 2008, 08:21:56 am

Previous topic - Next topic

Blizzard

Range works like this: When an enemy gets into range, the trap goes off. i.e. you put a bear trap down there and set the range to 0.5. It will go off as soon as an enemy steps onto it.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Makasu

April 05, 2009, 09:45:16 am #1841 Last Edit: April 05, 2009, 12:32:11 pm by Makasu
So the range of the item has no real importance then?

def self.type(id)
      case id
when 48 then return [TRAP, 1.5, 116] #mine


 def self.range(id)
      case id
when 48 then return 2.5 #mine


and range would be the one that needs to be set up with the radius correct?
Also if I wanted the HUD to draw the name of the current weapon used what be the way of doing so?
I have no use for Levels in my game so I'm having the hud draw either the current status of the player or the currently equipped weapon name. But I can't figure out what the weapons name and or status is connected to. Like actor.states or whatever the case may be.

And would exploding objects be possible? Y'know like exploding barrels? That'd be a pretty cool function.
Dead on Arrival is the name of my project. Topic thread coming sooner or later.

Me on deviantart.com
My talents: ShowHide

  • Spriting
  • drawing
  • html coding
  • website design
  • skating
             PM now for a personal quote!
[[Will draw character art for you for $$$ or scripts!]]




Shadonking

blizz the arrows in my hotkey menu are not in line with the boxes.

the only script i use that messes with you abs is this

Spoiler: ShowHide
#==============================================================================
# Scene_CMSSave
#==============================================================================

class Scene_CMSSave < Scene_Save
 
  def on_cancel
    $game_system.se_play($data_system.cancel_se)
    $scene = Scene_Menu.new(9)
  end
 
end

#==============================================================================
# Scene_CMSLoad
#==============================================================================

class Scene_CMSLoad < Scene_Load
 
  def on_cancel
    $game_system.se_play($data_system.cancel_se)
    $scene = Scene_Menu.new(10)
  end
 
end
#==============================================================================
# ** Window_Command_Scroll
#------------------------------------------------------------------------------
#  This window deals with general command choices.
#==============================================================================

class Window_Command_Scroll < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     width    : window width
  #     commands : command text string array
  #--------------------------------------------------------------------------
  def initialize(width, commands, height)
    # Compute window height from command quantity
    super(0, 0, width, height)
    @item_max = commands.size
    @commands = commands
    self.contents = Bitmap.new(width - 32, @item_max * 32)
    refresh
    self.index = 0
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    for i in 0...@item_max
      draw_item(i, normal_color)
    end
  end
  #--------------------------------------------------------------------------
  # * Draw Item
  #     index : item number
  #     color : text color
  #--------------------------------------------------------------------------
  def draw_item(index, color)
    self.contents.font.color = color
    rect = Rect.new(4, 32 * index, self.contents.width - 8, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    self.contents.draw_text(rect, @commands[index])
  end
  #--------------------------------------------------------------------------
  # * Disable Item
  #     index : item number
  #--------------------------------------------------------------------------
  def disable_item(index)
    draw_item(index, disabled_color)
  end
end

#==============================================================================
# Window_CMSCommand EDIT 12345
#==============================================================================

class Window_CMSCommand < Window_Command_Scroll
 
  attr_reader :continue
 
  def initialize(index, continue)
    @background = 'CMSCommand'
    commands = [$data_system.words.item, 'Equipment', $data_system.words.equip,
        $data_system.words.skill, 'Status', 'Hotkeys', 'AI Behavior',
        'AI Triggers', 'Options', 'Save', 'Load', 'Exit']
    super(180, commands, 320)
    @continue, self.index, self.x, self.y, self.z = continue, index, 972, 0, 999
  end
 
  def draw_item(i, color)
    self.contents.fill_rect(0, i*32, 148, 32, Color.new(0, 0, 0, 0))
    bitmap = RPG::Cache.icon("CMS/commandmenu#{i}")
    opacity = (color == normal_color ? 255 : 128)
    self.contents.blt(4, 4 + i*32, bitmap, Rect.new(0, 0, 24, 24), opacity)
    self.contents.font.color = color
    self.contents.draw_text(32, i*32, 148, 32, @commands[i])
  end
 
end

#==============================================================================
# Scene_Menu EDIT 12345
#==============================================================================

class Scene_Menu
 
  def initialize(menu_index = 0)
    @menu_index = menu_index
    @actor_index = @target_index = -1
    @viewport1 = Viewport.new(0, 0, 640, 480)
    @moved = false
  end

  def main
    if BlizzCFG::MAP_BACKGROUND
      @spriteset = Spriteset_Map.new
    elsif BlizzCFG::CMS_EDITION
      @spriteset = Sprite.new
      @spriteset.bitmap = RPG::Cache.picture("CMS/#{BlizzCFG::CMS_EDITION}/CMSFullscreen")
    end
    continue = ((1..BlizzCFG::SAVE_FILES_NUMBER).any? {|i|
        FileTest.exist?("#{BlizzCFG::SAVE_NAME}#{i}.#{BlizzCFG::SAVE_EXTENSION}")})
    @command_window = Window_CMSCommand.new(@menu_index, continue)
    (0...8).each {|i| @command_window.disable_item(i)} if $game_party.actors.size == 0
    @command_window.disable_item(9) if $game_system.save_disabled
    @info_window = Window_CMSInfo.new
    @status_windows, @target_windows = [], []
    $game_party.actors.each {|actor|
        @status_windows.push(Window_CMSMenuStatus.new(actor))}
    @help_window = Window_Help.new
    @help_window.x, @help_window.y, @help_window.z = 0, -368, 9999
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      break if @scene != nil || $scene != self
    end
    loop do
      Graphics.update
      (@status_windows + [@command_window, @info_window]).each {|win| win.update}
      move_da_outro
      break if @status_windows[0].x <= - 512
    end
    Graphics.freeze
    (@status_windows + @target_windows + [@command_window, @info_window,
        @help_window, @spriteset]).each {|obj| obj.dispose if obj != nil}
    del_sort if @sort_window != nil
    del_status if @playerstatus_window != nil
    del_equip if @left_window != nil
    del_skill if @skill_window != nil
    del_end if @end_window != nil
    del_items if @item_choose_window != nil
    del_items if @equips_window != nil
    del_options if @options_window != nil
    if @scene.is_a?(Scene_Title)
      Graphics.transition(25)
      Graphics.freeze
    end
    $scene = @scene
  end
 
  def update_command #EDIT 12345
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      if $game_party.actors.size == 0 && @command_window.index < 5
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      case @command_window.index
      when 0
        $game_system.se_play($data_system.decision_se)
        if BlizzCFG::CUSTOM_ITEM_SCENE
          @scene = Scene_Item.new
        else
          @item_choose_window = Window_CMSChooseItem.new
          @items_window1 = Window_NormalItem.new
          @items_window2 = Window_QuestItem.new
          @items_window1.help_window = @items_window2.help_window = @help_window
          @command_window.active = false
          @help_window.x, @help_window.y = 0, -576
          @help_window.set_text('')
          @help_window.visible = false
          items_refresh
        end
      when 1..4
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_windows.each {|win| win.active = true}
        @actor_index = 0
      when 5
        $game_system.se_play($data_system.decision_se)
        @scene = Scene_Hotkeys.new
      when 6
        $game_system.se_play($data_system.decision_se)
        @scene = Scene_AI_Behavior.new
      when 7
        $game_system.se_play($data_system.decision_se)
        @scene = Scene_AI_Triggers.new
      when 8
        $game_system.se_play($data_system.decision_se)
        if BlizzCFG::CUSTOM_OPTIONS_SCENE
          @scene = Scene_Options.new
        else
          @options_window = Window_CMSOptions.new
          @command_window.active = false
        end
      when 9
        if $game_system.save_disabled
          $game_system.se_play($data_system.buzzer_se)
        else
          $game_system.se_play($data_system.decision_se)
          @scene = Scene_CMSSave.new
          Graphics.transition(0)
        end
      when 10
        if @command_window.continue
          $game_system.se_play($data_system.decision_se)
          @scene = Scene_CMSLoad.new
          Graphics.transition(0)
        else
          $game_system.se_play($data_system.buzzer_se)
        end
      when 11
        $game_system.se_play($data_system.decision_se)
        if BlizzCFG::CUSTOM_END_SCENE
          @scene = Scene_End.new
        else
          @command_window.active = false
          @end_window = Window_CMSEndCommand.new
        end
      end
    end
  end

end

#==============================================================================
# Scene_Hotkeys
#------------------------------------------------------------------------------
#  This class handles the skill/item hotkey processing.
#==============================================================================

class Scene_Hotkeys
 
  def initialize
    super
  end
  #----------------------------------------------------------------------------
  # main
  #  The main processing method.
  #----------------------------------------------------------------------------
  def main
    # create spriteset
    @spriteset = Spriteset_Map.new
    # create viewport
    @view = Viewport.new(0, 0, 640, 480)
    # create HUD if HUD is turned on and HUD active
    @hud = Hud.new if BlizzABS::Config::HUD_ENABLED && $game_system.hud
    # if ASSIGNMENT is turned
    if BlizzABS::Config::HOTKEYS
      # create assignment display
      @hotkeys = Hotkey_Assignment.new
      # set z position
      @hotkeys.z = 5000
    end
    # if MINIMAP is turned on and minimap active
    if BlizzABS::Config::MINIMAP && $game_system.minimap > 0
      # create HUD
      @minimap = Minimap.new
    end
    # create sprite
    @choice = Sprite.new
    # create bitmap
    @choice.bitmap = $BlizzABS.cache.image('menu_arrow')
    # set x, y and z positions
    @choice.x, @choice.y, @choice.z, @choice.opacity = 160, 40, 500, 128
    # set x position offset
    @choice.ox = -8
    # set active flag
    @active = true
    # set index
    @index = 0
    # set up mode flag
    @up_mode = true
    # create modified skill window
    @skill_window = Window_Skill_Hotkey.new($game_player.battler)
    # create modified item window
    @item_window = Window_Item_Hotkey.new
    # set last active
    @last_active = true
    # transtition
    Graphics.transition
    # loop
    loop do
      # update game screen
      Graphics.update
      # update input
      Input.update
      # frame update
      update
      # stop if chosen an option
      break if $scene != self
    end
    # freeze screen
    Graphics.freeze
    # delet spriteset
    @spriteset.dispose
    # delete HUD elements that exist
    [@hud, @hotkeys, @minimap].each {|s| s.dispose if s != nil}
    # delete choice sprite
    @choice.dispose
    # delete skill window
    @skill_window.dispose
    # delete item window
    @item_window.dispose
    # delete viewport
    @view.dispose
  end
  #----------------------------------------------------------------------------
  # update
  #  The update processing method.
  #----------------------------------------------------------------------------
  def update
    # update choice sprite
    @choice.update
    # update skill window
    @skill_window.update
    # update item window
    @item_window.update
    # update hotkey assignment display if existing
    @hotkeys.update if @hotkeys != nil
    # move by 2 or 1 whether active in direction depending on @up_mode
    @choice.oy += (@up_mode ? (@active ? 2 : 1) : (@active ? -2 : -1))
    # set new @up_mode if necesseray depending on @up_mode
    @up_mode = (@up_mode ? (@choice.oy < 8) : (@choice.oy <= -8))
    # if select button pressed
    if $game_system.select_button && Input.trigger?(Input::Select)
      # switch to next actor
      @skill_window.switch_actor
    # if active
    elsif @active
      # set choice offset always to a number dividable with 2
      @choice.oy = @choice.oy / 2 * 2
      # update hotkey selection
      update_choice
    # if skill window is active
    elsif @skill_window.active
      # update skill selection
      update_skill
    # if item window is active
    elsif @item_window.active
      # update item selection
      update_item
    end
  end
  #----------------------------------------------------------------------------
  # update_choice
  #  Updates input during the hotkey selection.
  #----------------------------------------------------------------------------
  def update_choice
    # set x position
    @choice.x = 146 + @index * 28
    # if pressed B
    if Input.trigger?(Input::B)
      # play cancel sound
      $game_system.se_play($data_system.cancel_se)
      # go back to menu
      $scene = Scene_Menu.new(5)
    # if C is pressed
    elsif Input.trigger?(Input::C)
      # play sound
      $game_system.se_play($data_system.decision_se)
      # not active
      @active = false
      # the one that was active the last time is now active
      @skill_window.active = @last_active
      @item_window.active = (!@last_active)
    # if RIGHT is being pressed
    elsif Input.repeat?(Input::RIGHT)
      # if RIGHT is pressed or index is less than 9
      if Input.trigger?(Input::RIGHT) || @index < 9
        # play sound
        $game_system.se_play($data_system.cursor_se)
        # set new index
        @index = (@index + 1) % 10
      end
    # if LEFT is being pressed
    elsif Input.repeat?(Input::LEFT)
      # if LEFT is pressed or index is equal or greater than 1
      if Input.trigger?(Input::LEFT) || @index >= 1
        # play sound
        $game_system.se_play($data_system.cursor_se)
        # set new index
        @index = (@index + 9) % 10
      end
    end
  end
  #----------------------------------------------------------------------------
  # update_skill
  #  Updates input during the skill selection.
  #----------------------------------------------------------------------------
  def update_skill
    # set last active
    @last_active = true
    # if B is pressed
    if Input.trigger?(Input::B)
      # play cancel sound
      $game_system.se_play($data_system.cancel_se)
      # set active
      @active = true
      # skill window is not active
      @skill_window.active = false
      # delete cursor
      @skill_window.cursor_rect.empty
    # if C is pressd
    elsif Input.trigger?(Input::C)
      # play sound
      $game_system.se_play($data_system.decision_se)
      # if last position
      if @skill_window.index == @skill_window.item_max - 1
        # remove hotkey assigmnent from skill
        $game_player.skill_hotkeys[(@index+1)%10] = 0
      else
        # set skill to hotkey
        $game_player.skill_hotkeys[(@index+1)%10] = @skill_window.skill.id
      end
      # remove hotkey assigmnent from item
      $game_player.item_hotkeys[(@index+1)%10] = 0
      # draw hotkey display if hotkey display exists
      @hotkeys.draw(@index+1) if @hotkeys != nil
      # set active
      @active = true
      # skill window is not active
      @skill_window.active = false
      # delete cursor
      @skill_window.cursor_rect.empty
    # if RIGHT or LEFT is pressed
    elsif Input.trigger?(Input::RIGHT) || Input.trigger?(Input::LEFT)
      # play sound
      $game_system.se_play($data_system.cursor_se)
      # item window is active
      @item_window.active = true
      # skill window is not active
      @skill_window.active = false
      # delete cursor
      @skill_window.cursor_rect.empty
    end
  end
  #----------------------------------------------------------------------------
  # update_item
  #  Updates input during the item selection.
  #----------------------------------------------------------------------------
  def update_item
    # set last active
    @last_active = false
    # if B is pressed
    if Input.trigger?(Input::B)
      # play cancel sound
      $game_system.se_play($data_system.cancel_se)
      # set active
      @active = true
      # item window is not active
      @item_window.active = false
      # delete cursor
      @item_window.cursor_rect.empty
    # if C is pressed
    elsif Input.trigger?(Input::C)
      # play sound
      $game_system.se_play($data_system.decision_se)
      # if last position
      if @item_window.index == @item_window.item_max - 1
        # remove hotkey assigmnent from item
        $game_player.item_hotkeys[(@index+1)%10] = 0
      else
        # set item to hotkey
        $game_player.item_hotkeys[(@index+1)%10] = @item_window.item.id
      end
      # remove hotkey assigmnent from skill
      $game_player.skill_hotkeys[(@index+1)%10] = 0
      # draw hotkey display if hotkey display exists
      @hotkeys.draw(@index+1) if @hotkeys != nil
      # set active
      @active = true
      # item window is not active
      @item_window.active = false
      # delete cursor
      @item_window.cursor_rect.empty
    # if RIGHT or LEFT is pressed
    elsif Input.trigger?(Input::RIGHT) || Input.trigger?(Input::LEFT)
      # play sound
      $game_system.se_play($data_system.cursor_se)
      # skill window is active
      @skill_window.active = true
      # item window is not active
      @item_window.active = false
      # delete cursor
      @item_window.cursor_rect.empty
    end
  end
 
end
#==============================================================================
# Scene_AI_Behavior
#------------------------------------------------------------------------------
#  This class processes handling of the scene where ally behavior can be set
#  up which is used by the Ally Combat AI.
#==============================================================================

class Scene_AI_Behavior
 
  #----------------------------------------------------------------------------
  # Initialization
  #  tone  - screen background tone
  #  index - actor party index
  #----------------------------------------------------------------------------
  def initialize(index = 0, command_window_index = 0)
    # base data
    @index = index
    # get battler
    @actor = $BlizzABS.battlers[index].battler
    # command window index
    @command_window_index = command_window_index
  end
  #----------------------------------------------------------------------------
  # main
  #  The main processing method.
  #----------------------------------------------------------------------------
  def main
    # create spriteset
    @spriteset = Spriteset_Map.new
    # create viewport
    @view = Viewport.new(0, 0, 640, 480)
    # create command window
    @command_window = Window_Command.new(160, BlizzABS::Cache::CommandsAIBehavior)
    # command window coordinates
    @command_window.x = 480
    # command window initial index
    @command_window.index = @command_window_index
    # get map actor
    map_actor = $BlizzABS.battlers[@index]
    # create behavior window
    @behavior_window = Window_Behavior.new(@actor, map_actor)
    # transition
    Graphics.transition
    # loop
    loop do
      # update game screen
      Graphics.update
      # update input
      Input.update
      # update the scene
      update
      # stop if frame update
      break if $scene != self
    end
    # freeze screen
    Graphics.freeze
    # delete command window
    @command_window.dispose
    # delete behavior window
    @behavior_window.dispose
    # delete spriteset
    @spriteset.dispose
    # delete viewport
    @view.dispose
  end
  #----------------------------------------------------------------------------
  # update_command
  #  The command window update processing method.
  #----------------------------------------------------------------------------
  def update_command
    # update command window
    @command_window.update
    # if B is pressed
    if Input.trigger?(Input::B)
      # play cancel sound
      $game_system.se_play($data_system.cancel_se)
      # create map scene
      $scene = Scene_Menu.new(6)
    # if C is pressed
    elsif Input.trigger?(Input::C)
      # which option
      case @command_window.index
      when 0
        # play sound
        $game_system.se_play($data_system.decision_se)
        # deactivate command window
        @command_window.active = false
        # activate behavior window
        @behavior_window.active = true
      when 1
        # play sound
        $game_system.se_play($data_system.decision_se)
        # get all AI actors
        battlers = $BlizzABS.battlers
        # set next index
        @index = (@index + 1) % battlers.size
        # if battler not valid
        while battlers[@index].battler == nil
          # try to find one that is
          @index = (@index + 1) % battlers.size
        end
        # create hotkey assignment scene with the current screen tint
        $scene = Scene_AI_Behavior.new(@index, @command_window.index)
      when 2
        # play sound
        $game_system.se_play($data_system.decision_se)
        # get all AI actors
        battlers = $BlizzABS.battlers
        # set previous index
        @index = (@index + battlers.size - 1) % battlers.size
        # if battler not valid
        while battlers[@index].battler == nil
          # try to find one that is
          @index = (@index + battlers.size - 1) % battlers.size
        end
        # create hotkey assignment scene with the current screen tint
        $scene = Scene_AI_Behavior.new(@index, @command_window.index)
      when 3
        # play sound
        $game_system.se_play($data_system.decision_se)
        # create map scene
        $scene = Scene_Map.new
      end
    # if R is pressed
    elsif Input.trigger?(Input::R)
      # play sound
      $game_system.se_play($data_system.decision_se)
      # get all AI actors
      battlers = $BlizzABS.battlers
      # set next index
      @index = (@index + 1) % battlers.size
      # if battler not valid
      while battlers[@index].battler == nil
        # try to find one that is
        @index = (@index + 1) % battlers.size
      end
      # create hotkey assignment scene with the current screen tint
      $scene = Scene_AI_Behavior.new(@index, @command_window.index)
    # if L is pressed
    elsif Input.trigger?(Input::L)
      # play sound
      $game_system.se_play($data_system.decision_se)
      # get all AI actors
      battlers = $BlizzABS.battlers
      # set previous index
      @index = (@index + battlers.size - 1) % battlers.size
      # if battler not valid
      while battlers[@index].battler == nil
        # try to find one that is
        @index = (@index + battlers.size - 1) % battlers.size
      end
      # create hotkey assignment scene with the current screen tint
      $scene = Scene_AI_Behavior.new(@index, @command_window.index)
    end
  end
end
#==============================================================================
# Scene_AI_Triggers
#------------------------------------------------------------------------------
#  This class processes handling of the scene where ally action triggers can be
#  set up which is used by the Ally Trigger AI.
#==============================================================================

class Scene_AI_Triggers
 
  #----------------------------------------------------------------------------
  # Initialization
  #  tone  - screen background tone
  #  index - actor party index
  #----------------------------------------------------------------------------
  def initialize(index = 0, command_window_index = 0)
    # data
    @index, @actor = index, $BlizzABS.battlers[index].battler
    # command window index
    @command_window_index = command_window_index
    # status effect names
    @states = [BlizzABS::Cache::WORDNormalState]
    (1...$data_states.size).each {|id| @states.push($data_states[id].name)}
  end
  #----------------------------------------------------------------------------
  # main
  #  The main processing method.
  #----------------------------------------------------------------------------
  def main
    # create spriteset
    @spriteset = Spriteset_Map.new
    # create viewport
    @view = Viewport.new(0, 0, 640, 480)
    # create command window
    @command_window = Window_Command.new(160, BlizzABS::Cache::CommandsAITrigger)
    # command window coordinates
    @command_window.x = 480
    # command window initial index
    @command_window.index = @command_window_index
    # create trigger command window
    @tcommand_window = Window_Command.new(160, BlizzABS::Cache::CommandsTrigger)
    # trigger command window coordinates
    @tcommand_window.x = 480
    @tcommand_window.y = @command_window.height
    # trigger command window no cursor
    @tcommand_window.index = -1
    # trigger command window not active
    @tcommand_window.active = false
    # create name window
    @name_window = Window_Base.new(480, 416, 160, 64)
    # create bitmap
    @name_window.contents = Bitmap.new(@name_window.width - 32,
        @name_window.height - 32)
    # if using Dyna Edition scripts
    if $fontface != nil
      # set font name and size
      @name_window.contents.font.name = $fontface
      @name_window.contents.font.size = $fontsize
    # if using PK Edition 2
    elsif $defaultfonttype != nil
      # set font name and size
      @name_window.contents.font.name = $defaultfonttype
      @name_window.contents.font.size = $defaultfontsize
    end
    # draw actor name
    @name_window.draw_actor_name(@actor, 4, 0)
    # update trigger command display
    check_triggers
    # creat triggers window
    @triggers_window = Window_Triggers.new(@actor)
    # transition
    Graphics.transition
    # loop
    loop do
      # update game screen
      Graphics.update
      # update input
      Input.update
      # update the scene
      update
      # stop if frame update
      break if $scene != self
    end
    # freeze screen
    Graphics.freeze
    # delete command window
    @command_window.dispose
    # delete trigger command window
    @tcommand_window.dispose
    # delete triggers window
    @triggers_window.dispose
    # delete name window
    @name_window.dispose
    # delete spriteset
    @spriteset.dispose
    # delete viewport
    @view.dispose
  end
  #----------------------------------------------------------------------------
  # update_command
  #  The command window update processing method.
  #----------------------------------------------------------------------------
  def update_command
    # update command window
    @command_window.update
    # if B is pressed
    if Input.trigger?(Input::B)
      # play cancel sound
      $game_system.se_play($data_system.cancel_se)
      # create map scene
      $scene = Scene_Menu.new(7)
    # if C is pressed
    elsif Input.trigger?(Input::C)
      # which option
      case @command_window.index
      when 0
        # play sound
        $game_system.se_play($data_system.decision_se)
        # deactivate command window
        @command_window.active = false
        # activate trigger command window
        @tcommand_window.active = true
        # set cursor
        @tcommand_window.index = 0
      when 1
        # play sound
        $game_system.se_play($data_system.decision_se)
        # get all AI actors
        battlers = $BlizzABS.battlers
        # set next index
        @index = (@index + 1) % battlers.size
        # if battler not valid
        while battlers[@index].battler == nil
          # try to find one that is
          @index = (@index + 1) % battlers.size
        end
        # create hotkey assignment scene with the current screen tint
        $scene = Scene_AI_Triggers.new(@index, @command_window.index)
      when 2
        # play sound
        $game_system.se_play($data_system.decision_se)
        # get all AI actors
        battlers = $BlizzABS.battlers
        # set next index
        @index = (@index + battlers.size - 1) % battlers.size
        # if battler not valid
        while battlers[@index].battler == nil
          # try to find one that is
          @index = (@index + battlers.size - 1) % battlers.size
        end
        # create hotkey assignment scene with the current screen tint
        $scene = Scene_AI_Triggers.new(@index, @command_window.index)
      when 3
        # play sound
        $game_system.se_play($data_system.decision_se)
        # create map scene
        $scene = Scene_Map.new
      end
    # if R is pressed
    elsif Input.trigger?(Input::R)
      # play sound
      $game_system.se_play($data_system.decision_se)
      # get all AI actors
      battlers = $BlizzABS.battlers
      # set next index
      @index = (@index + 1) % battlers.size
      # if battler not valid
      while battlers[@index].battler == nil
        # try to find one that is
        @index = (@index + 1) % battlers.size
      end
      # create hotkey assignment scene with the current screen tint
      $scene = Scene_AI_Triggers.new(@index, @command_window.index)
    # if L is pressed
    elsif Input.trigger?(Input::L)
      # play sound
      $game_system.se_play($data_system.decision_se)
      # get all AI actors
      battlers = $BlizzABS.battlers
      # set next index
      @index = (@index + battlers.size - 1) % battlers.size
      # if battler not valid
      while battlers[@index].battler == nil
        # try to find one that is
        @index = (@index + battlers.size - 1) % battlers.size
      end
      # create hotkey assignment scene with the current screen tint
      $scene = Scene_AI_Triggers.new(@index, @command_window.index)
    end
  end
end


is this cuasing the problem.





Creator Of Music And Games
Spoiler: ShowHide
]

keywords: ShowHide
rmxp rmvx blizz-abs rpg maker xp vx abs cbs cms script tons of addons charsets autotiles HUD


come here if you have a ps3
http://forum.chaos-project.com/index.php?topic=1952.0

G_G

How do we check to see if a certain summon has been summoned?

Makasu

Quote from: game_guy on April 05, 2009, 06:17:58 pm
How do we check to see if a certain summon has been summoned?

You could check if that summon is in the party since you have to define the summons in the party y'know? Just use a conditional branch and check if player [whatever] is in the party
Dead on Arrival is the name of my project. Topic thread coming sooner or later.

Me on deviantart.com
My talents: ShowHide

  • Spriting
  • drawing
  • html coding
  • website design
  • skating
             PM now for a personal quote!
[[Will draw character art for you for $$$ or scripts!]]




G_G

I meant like if any summon was in your party. I really dont want 52 branches in one event.

Blizzard

April 06, 2009, 04:58:52 am #1846 Last Edit: April 06, 2009, 05:02:56 am by Blizzard
Quote from: Makasu on April 05, 2009, 09:45:16 am
So the range of the item has no real importance then?

def self.type(id)
      case id
when 48 then return [TRAP, 1.5, 116] #mine


 def self.range(id)
      case id
when 48 then return 2.5 #mine


and range would be the one that needs to be set up with the radius correct?


It does. It's the radius in which it will go off. In this case it would go off if the enemy gets closer than 2.5 and then it would hurt everything within 1.5 with an explosion as well.

Quote from: Makasu on April 05, 2009, 09:45:16 am
Also if I wanted the HUD to draw the name of the current weapon used what be the way of doing so?
I have no use for Levels in my game so I'm having the hud draw either the current status of the player or the currently equipped weapon name. But I can't figure out what the weapons name and or status is connected to. Like actor.states or whatever the case may be.


"$data_weapons[actor.weapon_id].name". Just be sure to check if actor.weapon_id is equal to 0. In that case you need to avoid drawing anything.

Quote from: Makasu on April 05, 2009, 09:45:16 am
And would exploding objects be possible? Y'know like exploding barrels? That'd be a pretty cool function.


You can make a barrel a lifeless object which uses a forced action the moment it dies. But that won't probably work right. You'll have to wait for Custom Event Triggers and Timed Traps (aka bombs).

Quote from: Shadonking on April 05, 2009, 12:48:16 pm
blizz the arrows in my hotkey menu are not in line with the boxes.

the only script i use that messes with you abs is this

Spoiler: ShowHide
~REMOVED :P


is this cuasing the problem.


The script is too big to identify the problem right away. I'd need a demo.

Quote from: game_girl on April 05, 2009, 06:17:58 pm
How do we check to see if a certain summon has been summoned?


$BlizzABS.summoned?(CHARACTER)


CHARACTER is a map character. All summoned characters are contained in $BlizzABS.pets and $BlizzABS.monsters. If you want to check if a specific actor was summoned, you will need to use this:

($BlizzABS.pets + $BlizzABS.monsters).any? {|c| c.battler.id == ACTOR_ID}


In 2.24 you will alternatively be able to use this:

$BlizzABS.summons.any? {|c| c.battler.id == ACTOR_ID}


and/or this:

$BlizzABS.summoned_actor?(ACTOR_ID)

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Shadonking

April 06, 2009, 06:30:37 am #1847 Last Edit: April 06, 2009, 07:59:15 am by Shadonking
QuoteThe script is too big to identify the problem right away. I'd need a demo.


ok i'll post a demo when i get some time.

edit

just sent a PM with it in





Creator Of Music And Games
Spoiler: ShowHide
]

keywords: ShowHide
rmxp rmvx blizz-abs rpg maker xp vx abs cbs cms script tons of addons charsets autotiles HUD


come here if you have a ps3
http://forum.chaos-project.com/index.php?topic=1952.0

Blizzard

I didn't get any PM. o.o;
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Shadonking

okay try now, i temp lost internet connection when i sent it so that could have stopped it.





Creator Of Music And Games
Spoiler: ShowHide
]

keywords: ShowHide
rmxp rmvx blizz-abs rpg maker xp vx abs cbs cms script tons of addons charsets autotiles HUD


come here if you have a ps3
http://forum.chaos-project.com/index.php?topic=1952.0

Makasu

April 06, 2009, 08:29:43 am #1850 Last Edit: April 07, 2009, 10:54:37 am by Makasu
Blizz you're my hero. :D I couldn't figure it out for anything and that worked perfectly.
I also figured out a way around the displaying a blank characterset when no weapon is equipped using a long ass common event. :p But its okay nonetheless. Thanks once again.

*Powers up*

But I have a question now would I have to define a new update method so it'll update upon weapon switching because this happens

overlapping: ShowHide
[/img]

Dead on Arrival is the name of my project. Topic thread coming sooner or later.

Me on deviantart.com
My talents: ShowHide

  • Spriting
  • drawing
  • html coding
  • website design
  • skating
             PM now for a personal quote!
[[Will draw character art for you for $$$ or scripts!]]




Hellfire Dragon

Hey blizz is there a way to check if a projectile skill or weapon hit an enemy? Also is there a way to check the ID of that enemy?

Blizzard

Sure. When something hits an enemy, it's processed in Map_Battler. The methods are attack_effect, skill_effect and item_effect. You can check the IDs of the current battler (self.battler.id), the skill ID in skill_effect (skill.id), the item ID in item_effect (item.id) and the weapon ID of the attacking battler (battler.weapon_id for actors or battler.id for enemies).

You will need to alias those methods and add what you need.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Hellfire Dragon

How would I do that?

Delyemerald2

I have two problems:
1. I have made a item called Red Potion. For example, I pickup three. When I use it I still have three. And if I set it as hotkey, it has the ifinite character with it.
2. How can you let an event start, if you defeat a boss?

Makasu

1. Did you set the scope to something? Sometimes I foget to set the scope of the item to be like one enemy the user etc. The infinite symbol is because you don't have it set to consumable under the items tab. Just set those and it should be good. Give it a scope and make it consumable.
2. Use a switch that is activated in the events name since custom triggers aren't out yet. Just set it to turn on the switch and then then have the event activate when the switch is on. You know how to do this correct?
Dead on Arrival is the name of my project. Topic thread coming sooner or later.

Me on deviantart.com
My talents: ShowHide

  • Spriting
  • drawing
  • html coding
  • website design
  • skating
             PM now for a personal quote!
[[Will draw character art for you for $$$ or scripts!]]




Delyemerald2

1. -.- I thought if you set it to no you can't sell or buy it... XD
2. Yeah, I read the whole enemy part yesterday, so.

Blizzard

April 08, 2009, 04:49:37 am #1857 Last Edit: April 08, 2009, 05:31:35 am by Blizzard
FINALLY! v2.3 IS UP! It contains several bug fixes and a few small extras.

I forgot to fix the tile graphic with events error. I'll do it in the next few days. And I fixed something that I forgot to add into the version history. That wouldn't be a problem, but I forgot what it was. >.<

EDIT: Nvm, I fixed it in v2.31.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Makasu

DORIS?!?!?!?! Anyways yes Blizz you are a scripting god. You fixed so much! :D And added so much.
Dead on Arrival is the name of my project. Topic thread coming sooner or later.

Me on deviantart.com
My talents: ShowHide

  • Spriting
  • drawing
  • html coding
  • website design
  • skating
             PM now for a personal quote!
[[Will draw character art for you for $$$ or scripts!]]




tSwitch

Quote from: Doris on April 08, 2009, 04:49:37 am
FINALLY! v2.3 IS UP! It contains several bug fixes and a few small extras.

I forgot to fix the tile graphic with events error. I'll do it in the next few days. And I fixed something that I forgot to add into the version history. That wouldn't be a problem, but I forgot what it was. >.<

EDIT: Nvm, I fixed it in v2.31.


did you fix the respawn point thing?
what where they don't get erased if you delete or rename them?


FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: tSwitch.us | Twitter | Tumblr