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.

Forcing the Skill

I actually just have one little itty bitty question:

What is the command in Scene_Battle that tells the current battler to use the skill? Either forcing the skill or just plain using it and such.

Thanks for any help you can give.
 
Okay, got it to work. However, now I've run into a problem. Basically, I'm attempting to merge the Materia and RTAB again. I've made much more progress since last time. However, I'm stuck again.

The problem seems to lie in the def update_phase3_skill_select section under Scene_Battle. Now I've got the "All" function working properly, and it only goes for the skill paired with the All materia as well. Hooray! However, I've come to a problem: a skill not paired with the All materia will not work. It doesn't crash the game, it just doesn't cast the skill, turns the skill window off for a second, and then brings back the skill select window. Of course, this is not good. I'm trying to make it so that when the all materia is not paired with the skill materia, it just runs the skill sequence like normal.

Here's my code right now:
Code:
  def update_phase3_skill_select
    # During command selecting when it becomes incapacitation,
    unless @active_actor.inputable?
      @active_actor.current_action.clear
      command_delete
      # To command input of the following actor
      phase3_next_actor
      return
    end
    # The skill window is put in visible state
    @skill_window.visible = true
    # Renewing the skill window
    @skill_window.update
    # The B when button is pushed,
    if Input.trigger?(Input::B)
      # Performing cancellation SE
      $game_system.se_play($data_system.cancel_se)
      # End selection of skill 
      end_skill_select
      return
    end
    # When C button is pushed,
    if Input.trigger?(Input::C)
      # Acquiring the data which presently is selected in the skill window
      @skill = @skill_window.skill
      # When you cannot use,
      if @skill == nil or not @active_actor.skill_can_use?(@skill.id)
        # Performing buzzer SE
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # Performing decision SE
      $game_system.se_play($data_system.decision_se)
      # Setting action
      @active_actor.current_action.skill_id = @skill.id
      # The skill window is put in invisibility state
      @skill_window.visible = false
    # Gets Active Battlers Paired Materia
    paired_materia_set = @active_actor.return_paired_materia
    for paired_set in paired_materia_set
      materia = paired_set[2]
      other_materia = paired_set[3]
      if materia.special_effect == 'All'
        for skill_id in other_materia.skills
          if skill_id == @skill.id
            @skill.scope = 2 if @skill.scope == 1
            @skill.scope = 4 if @skill.scope == 3 || @skill.scope == 7
            @skill.scope = 6 if @skill.scope == 5
            # Set action
            @active_actor.current_action.skill_id = @skill.id
            # Setting action
            @active_actor.current_action.kind = 1
            # End selection of skill
            end_skill_select
            # To command input of the following actor
            phase3_next_actor
          end
          return
        end
      end
    end
      # When the effective range is the enemy single unit,
      if @skill.scope == 1
        # Starting the selection of the enemy
        start_enemy_select
      # When the effective range is the friend single unit,
      elsif @skill.scope == 3 or @skill.scope == 5
        # Starting the selection of the actor
        start_actor_select
      # When the effective range is not the single unit,
      else
        # Setting action
        @active_actor.current_action.kind = 1
        # End selection of skill
        end_skill_select
        # To command input of the following actor
        phase3_next_actor
      end
      return
    end
  end
Scratching my brain here. Any help or clues as to what I need to do would be greatly appreciated.

Thanks!
 

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