RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
BEM Error

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 63
RMRK Junior
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.
"For some reason, my force powers haven't been working in a long time. I keep looking at things and waving my hands, but nothing ever happens."

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
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:

Code: [Select]
    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:

Code: [Select]
    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.

**
Rep: +0/-0Level 63
RMRK Junior
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.
"For some reason, my force powers haven't been working in a long time. I keep looking at things and waving my hands, but nothing ever happens."

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Well, clarify what you mean why you say "force a character action to finish a boss battle."

**
Rep: +0/-0Level 63
RMRK Junior
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.
"For some reason, my force powers haven't been working in a long time. I keep looking at things and waving my hands, but nothing ever happens."

**
Rep: +0/-0Level 63
RMRK Junior
I figured out a way to fix this, this topic can be closed... thanks for the help MA.
« Last Edit: January 16, 2012, 11:20:33 AM by phelonius148 »
"For some reason, my force powers haven't been working in a long time. I keep looking at things and waving my hands, but nothing ever happens."

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Sorry for not responding; I had forgotten all about this request. I am glad to hear it's been fixed.

**
Rep: +0/-0Level 63
RMRK Junior
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. ;)
"For some reason, my force powers haven't been working in a long time. I keep looking at things and waving my hands, but nothing ever happens."