Hi, I tried exhuming MrMo's ABS. Apart from the ABS system, it allows the player setting certain keys with learned skills.
I wanted to use a Script Call to set automatically these hotkeys, without the player possibility to choose, but I don't know how.
I guess the answer's in the og script itself, but I can't understand ruby... Could you kindly tell what to do? :dizzy:
I wanted to use a Script Call to set automatically these hotkeys, without the player possibility to choose, but I don't know how.
I guess the answer's in the og script itself, but I can't understand ruby... Could you kindly tell what to do? :dizzy:
def update_skill
mrmo_moabs_scene_skill_update_skill
#Get all the keys
for key in @actor.skill_keys.keys
next if key.nil?
#Check is the the key is pressed
next if !Input.trigger?(key)
next if hot_key_has_value?(@skill_window.skill.id)
$game_system.se_play($data_system.decision_se)
#Record Skill
@actor.skill_keys[key] = @skill_window.skill.id
@skill_window.active = false
@shk_window.active = @shk_window.visible = true
end
end
#--------------------------------------------------------------------------
# * Check if any other hotkey has this.
#--------------------------------------------------------------------------
def hot_key_has_value?(id)
@actor.skill_keys.each {|key, value|
if value == id
@actor.skill_keys[key] = nil
end
}
return false
end
#--------------------------------------------------------------------------
# * Frame Update Skill Hot Key
#--------------------------------------------------------------------------
def update_shk
#Return if Enter isn't pressed
return if !Input.trigger?(Input::C)
#Play decision
$game_system.se_play($data_system.decision_se)
@shk_window.active = @shk_window.visible = false
@skill_window.active = true
$scene = Scene_Skill.new(@actor_index)
end
end
mrmo_moabs_scene_skill_update_skill
#Get all the keys
for key in @actor.skill_keys.keys
next if key.nil?
#Check is the the key is pressed
next if !Input.trigger?(key)
next if hot_key_has_value?(@skill_window.skill.id)
$game_system.se_play($data_system.decision_se)
#Record Skill
@actor.skill_keys[key] = @skill_window.skill.id
@skill_window.active = false
@shk_window.active = @shk_window.visible = true
end
end
#--------------------------------------------------------------------------
# * Check if any other hotkey has this.
#--------------------------------------------------------------------------
def hot_key_has_value?(id)
@actor.skill_keys.each {|key, value|
if value == id
@actor.skill_keys[key] = nil
end
}
return false
end
#--------------------------------------------------------------------------
# * Frame Update Skill Hot Key
#--------------------------------------------------------------------------
def update_shk
#Return if Enter isn't pressed
return if !Input.trigger?(Input::C)
#Play decision
$game_system.se_play($data_system.decision_se)
@shk_window.active = @shk_window.visible = false
@skill_window.active = true
$scene = Scene_Skill.new(@actor_index)
end
end