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.

Checking Battle Phase

I'm in the midst of creating an in-battle tutorial. What I can't figure out, is how to check if the battle is in a certain phase. For example, I have it like this:

  • Player enters battle. A small picture saying "Tutorial" comes in. The picture then fades out.
  • Another picture comes in, but this one says "Pre-Battle". This one, also, fades out.
  • Then I have yet another picture explaining the party commands of "Fight" and "Escape".
  • The player must select "Fight" to continue. "Escape" is disabled.
  • (This is where I am stuck) I need to check if the battle is in command select phase. That way, I can put another picture that explains the commands.

If I can get help on this, then I can do the rest myself. I know it has something to do with the phase3 part in Scene_Battle 3. I just don't know exactly where to put it. If anyone needs a demo of what I have so far, by all means, ask. Thanks for any help, and if this is in the wrong forum, please move it.
 
The defs are pretty much universal since they were all modeled after the default system. Can't say that about Tacticals or Zelda/ABS systems... rats...

Whether it be the default system, ParaDog's ATB, Trickster's TRTAB, Cogwheel's RTAB, Fomar0153's Action Cost system... most every one of them uses the same basic def statements.

The section that sets up the Actor Command Window is:
def phase3_setup_command_window
While the routine that actively checks and performs the actions is:
def update_phase3_basic_command

You may wanna use the first one so the window pops up just before your Tutorial Image Window does.
 
Ok. So my event is the following (yes it's as an event, I just needed to know if I could check the phase through scripting):

Code:
@>Comment: ========================================================
@>Comment: ** Begin Battle Tutorial
@>Comment: ========================================================
@>Comment: --------------------------------------------------------
@>Comment: * Tutorial Pic
@>Comment: --------------------------------------------------------
@>Show Picture: 2,'Tutorial',Upper Left(-180, 215),(100%, 100%),255,Normal
@>Move Picture: 2,@20,Upper Left(230,215),(100%,100%),255,Normal
@>Wait: 30 Frame(s)
@>Move Picture: 2,@20,Upper Left(820, 215),(100%, 100%), 255,Normal
@>Wait: 21 Frame(s)
@>Erase Picture: 2
@>Comment: --------------------------------------------------------
@>Comment: * Pre-Battle Pic
@>Comment: --------------------------------------------------------
@>Show Picture: 3,'Pre-Battle',Upper Left(-224, 215),(100%, 100%),255,Normal
@>Move Picture: 3,@20,Upper Left(208,215),(100%,100%),255,Normal
@>Wait: 30 Frame(s)
@>Move Picture: 3,@20,Upper Left(864, 215),(100%, 100%), 255,Normal
@>Wait: 21 Frame(s)
@>Erase Picture: 3
@>Comment: --------------------------------------------------------
@>Comment: * Fight or Escape Pic
@>Comment: --------------------------------------------------------
@>Show Picture: 4,'FightorEscape',Upper Left(-480, 0),(100%,100%),255,Normal
@>Move Picture: 4,@20,Upper Left(0,0),(100%,100%),255,Normal
@>Wait: 30 Frame(s)
@>Move Picture: 4,@20,Upper Left(480, 0),(100%, 100%), 255,Normal
@>Wait: 21 Frame(s)
@>Erase Picture: 4
After that last event command, "Erase Picture: 4", is where I would like to check if the player had chosen the "Fight" option. My question now is, what lines of code would I use? Would I use
Code:
class Scene_Battle
if @phase = 3
# code
end
end
in a conditional branch?

Would that check to see if the battle is in that particular phase? If it does, I would then display another picture explaining the battle commands. If this sounds too confusing, I can make a demo of what I have so far. And if this is no longer suited for RGSS support, please move it. Thanks.
 

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