Squall leonhart 323
Member
...Ive got the problem when the enemy uses a skill it crashes like coopz121 so can we have that fixed please...
EDIT:Im just gonna make my enemys attack.
EDIT:Im just gonna make my enemys attack.
Atoa":29qxd75u said:lol, this is again has nothing to do with the script, since it's *you* that type the command on the script call.
If it's on the wrong line it's because you wrote it wrong.
And you dont need to write "materia_avaliable", any word/letter you write works.
So you can use something like
m_a = [1,2,3,4]
$scene = Scene_MateriaShop.new(m_a)
or
x = [1,2,3,4]
$scene = Scene_MateriaShop.new(x)
def make_skill_action_result
@skill = $data_skills[@active_battler.current_action.skill_id]
unless @active_battler.current_action.forcing
unless @active_battler.skill_can_use?(@skill.id)
$game_temp.forcing_battler = nil
@phase4_step = 1
return
end
end
@active_battler.sp -= @skill.sp_cost
@status_window.refresh
@help_window.set_text(@skill.name, 1)
@animation1_id = @skill.animation1_id
@animation2_id = @skill.animation2_id
@common_event_id = @skill.common_event_id
scope = @skill.scope
[b] if @active_battler.is_a?(Game_Enemy)
else[/b]
paired_materia_set = @active_battler.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
unless @skill.element_set.include?(Materia_Config::Negate_All_ID)
scope = 2 if @skill.scope == 1
scope = 4 if @skill.scope == 3 || @skill.scope == 7
scope = 6 if @skill.scope == 5
end
end
end
end
end
[b]end[/b]
set_target_battlers(scope)
for target in @target_battlers
target.skill_effect(@active_battler, @skill)
end
end
Well I Don't Have That Error Any More! :cheers:fredizdman":1i64ayfe said:Anyone who has the "undefined method `return_paired_materia` for #<Game_Enemy"
error... it can be fixed by changing the "def make_skill_action_result"
part of the Materia System Script
Back up your script before using this as I have no scripting knowledge. However, this fixes it for me.
The bolded parts are the only changes from the original.
Code:def make_skill_action_result @skill = $data_skills[@active_battler.current_action.skill_id] unless @active_battler.current_action.forcing unless @active_battler.skill_can_use?(@skill.id) $game_temp.forcing_battler = nil @phase4_step = 1 return end end @active_battler.sp -= @skill.sp_cost @status_window.refresh @help_window.set_text(@skill.name, 1) @animation1_id = @skill.animation1_id @animation2_id = @skill.animation2_id @common_event_id = @skill.common_event_id scope = @skill.scope [b] if @active_battler.is_a?(Game_Enemy) else[/b] paired_materia_set = @active_battler.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 unless @skill.element_set.include?(Materia_Config::Negate_All_ID) scope = 2 if @skill.scope == 1 scope = 4 if @skill.scope == 3 || @skill.scope == 7 scope = 6 if @skill.scope == 5 end end end end end [b]end[/b] set_target_battlers(scope) for target in @target_battlers target.skill_effect(@active_battler, @skill) end end
Hope this helps someone!! I looked FOREVER for this fix.