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.

Displaying messages after battle problem

I wasn't sure if this belongs in RGSS Support (because it does use a scripting line) or RMXP General Support (because it uses mostly events), but here goes.

You know all those scripts that display a window showing what skills a character has learned upon level up? Well, I've been trying to create an events version of that (I don't know how easy/hard it is to actually script a skill learned window, but I think events may be a little easier). I've actually done two versions of this, one for out-of-battle EXP/level gaining, another for after-battle (when results window is displayed). We'll focus on the after-battle one because that's where I'm having trouble with.

So, this is the event stuff that shows what skill a character has learned. For simplicity's sake, I'll only use one hero and one skill for this example:

Code:
@> Conditional Branch: [Aluxes] is [Feint Attack] learned
  @> Conditional Branch: Switch [0001: Learned FeintAttack] == OFF
    @> Text: Aluxes learned \c[6]Feint Attack\c[0]!
    @> Control Switches: [0001: Learned FeintAttack] = ON
    @>
   : Branch End
  @>
 : Branch End
@>

The "Learned FeintAttack" switch is turned on after the character learns the skill. Its purpose is supposed to prevent the message from being displayed every time a battle is won when the character has already learned the skill.

Now, I need to call that Common Event after each battle, and I want it to show up after the results window appears. So I go into Scene_Battle 2, def update_phase5, and under the "if @phase5_wait_count == 0" condition. And under @result_window.visible == true, I put it this:

Code:
common_event = $data_common_events[1]
        $game_system.battle_interpreter.setup(common_event.list, 0)

According to an FAQ I saw that's supposed to call a common event in the battle screen.

Now, it works... Sorta. While "Aluxes learned Feint Attack!" does pop up, and disappears when I press enter (or "C", whichever you want to call it), the screen remains on the battle. In fact, I can't exit the battle screen at all. The results window remains there and the victory ME effect keeps playing (when I press enter). I'm stuck.

So, what am I doing wrong? How do I get unstuck?
 

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