RMMZ Script line to check if the player is in a battle?

Indinera

Indie Dev
Veteran
Joined
Mar 13, 2012
Messages
2,057
Reaction score
855
First Language
French
I'd like to use a conditional branch to test that, but what code to put? Any clue?
 

rexie09

Villager
Member
Joined
Apr 4, 2021
Messages
26
Reaction score
10
First Language
English
Primarily Uses
RMMZ
The Game_party has a method inBattle that returns true if the player is in battle.

to call it in the game you would do
JavaScript:
$gameParty.inBattle()
 

ct_bolt

Creator
Veteran
Joined
May 3, 2012
Messages
974
Reaction score
563
First Language
Javascript
Primarily Uses
RMMZ
I'd like to use a conditional branch to test that, but what code to put? Any clue?
JavaScript:
$gameParty.inBattle()
that will return true if the party is in battle :)

Edit:
Dang ninja'd by @rexie09
 

Jragyn

JABS codemonkey
Veteran
Joined
Aug 14, 2012
Messages
221
Reaction score
172
First Language
English
Primarily Uses
RMMZ
Do be cognizant of the plugins you're using and how they affect things. For example, if you were leveraging JABS, then $gameParty.inBattle() would always return true so long as the JABS engine is enabled.
 

Latest Threads

Latest Posts

Latest Profile Posts

So the number one complaint I get so far is the levels are simply too large. What's funny is in testing I deemed levels taking too long and actually shortened them. Figuring I could beat them in 5-6 minutes so players would be able to do so in probably double that. I was apparently very mistaken, only one player has mentioned even reaching the second area. Let alone the first boss. :kaoswt:
I don't believe it. I actually did some proofreading in my game - and fixed some grammar errors! I feel so accomplished, knowing I can actually proofread my own writing!
...I've had a bad day, okay? Bad enough for me to want to proofread stuff. :yswt2:
Ughhh, July is not my month. Thankfully, it's nearly done.
mercba30 wrote on Jesse - PVGames's profile.
How do I get the new version of the character creator? Thank you in advance!

I fixed the lips and noses for MZ! The files have been updated.
qQwgk8C.png

Everything below!
Ugh, I opened MV after a few weeks and I'm completely lost on what I was working on.
Does it happen to someone else or am I the only disorganized one around? :kaoswt:
xH5Fk2f.jpg

Forum statistics

Threads
113,674
Messages
1,076,583
Members
147,694
Latest member
ProjectElpizo
Top