Not sure whether this is the right place for this question or not, but I guess I will ask anyways.
I've got the battle engine melody and all the YEM stuff. I also have a lighting script, a walk behind the top tile of walls script, the KGC-steal and compatibility script, as well as an anti-lag script. I have it all set up and working, Didn't really have any problems once I figured out how everything worked. However, I am now having my first real issue when I try to force a character action to finish a boss battle, I've tried both, skills, and a normal attack and it doesn't work. I'm getting the error:
Script 'YEM Battle Engine Melody V' line 6613: NoMethodError occurred.
undefined method 'active battle=' for #<Scene_Map:0xc224478>
Just wondering if anybody had any ideas how I might go about fixing this, it would be much appreciated.
Yeah, you have the right place - wrong topic though, so I split it into its own thread.
With respect to the error, I am not familiar with the script so this may not be correct, but I took a look and saw this:
if $scene.is_a?(Scene_Battle) and ($scene.ctb? or $scene.atb?)
iterate_battler(@params[0], @params[1]) do |battler|
next unless battler.exist?
current_active_battler = $scene.active_battler
$scene.active_battler = battler
$scene.process_action
$scene.active_battler = current_active_battler
end
$game_troop.forcing_battler = nil
end
around the line you mentioned. From what you described, my guess is that when the actor's action is processed, it ends the battle prematurely and sets the scene to Scene_Map, which causes an issue since it does not have a method for active_battler.
So, try replacing that section with the following:
if $scene.is_a?(Scene_Battle) and ($scene.ctb? or $scene.atb?)
iterate_battler(@params[0], @params[1]) do |battler|
next unless battler.exist?
current_active_battler = $scene.active_battler
$scene.active_battler = battler
$scene.process_action
break if !$scene.is_a?(Scene_Battle)
$scene.active_battler = current_active_battler
end
$game_troop.forcing_battler = nil
end
However, there might be a bigger problem, and that is how you are choosing to end the scene. If you are doing it outside the parameters of BEM (for instance, running a script call that just says: $scene = Scene_Map.new) then there will almost certainly be more problems that spring up.
I'll look a little close before posting next time...
That didn't fix it. It gives me the same error with a different scene map code. It's really weird, it finishes the battle and does the victory aftermath stuff and then the screen goes black after the battle wraps up and then it errors out. Thanks for trying dude, it's very much appreciated.
Well, clarify what you mean why you say "force a character action to finish a boss battle."
I'm trying to use a forced character action to strike the final blow to a boss. I have a text block set to play at 50% HP and then a second event page set to 20% HP, where I have a couple text blocks with a forced skill in-between to strike the final blow to the boss. It all plays out fine until the screen goes black after the victory aftermath, and as soon as the screen goes black, I get the error. It even happens in the battle test mode, and I have tried doing it with various actions. Whatever action I choose to force it still does the same thing.
I figured out a way to fix this, this topic can be closed... thanks for the help MA.
Sorry for not responding; I had forgotten all about this request. I am glad to hear it's been fixed.
No problem dude... having to figure it out actually made me learn a whole bunch about scripting, which is something I needed to do anyways. ;)