Game Over when party turns to stone?

StewS

Villager
Member
Joined
May 22, 2019
Messages
18
Reaction score
1
First Language
English
Primarily Uses
RMMV
I'm fashioning a dungeon where the player party will encounter enemies that can turn them to stone. I was testing out the enemy in battle and noticed even when the entire party is affected by the Stone state, the battle continues. The enemies just keep pummeling away at them. I want Stone to be treated basically as identical to a Knockout state, and for the player to get a Game Over if the whole party is affected.

Could anyone help me figure out the easiest way to that?
 

Aerosys

Veteran
Veteran
Joined
Apr 23, 2019
Messages
455
Reaction score
427
First Language
german
Primarily Uses
RMMZ
If it's just for some enemy troups, you can make a Troop Event that is triggered after each action and checks, if all party members are affected or not.

You can use something like this:

Code:
Turn switch "at least one Actor unaffected" OFF
Conditional Branch: Harold in Party
  Conditional Branch: Harold affected
    ..
  else
    Turn switch "at least one Actor unaffected" ON
  end
end

.. repeat for all Actors

Conditional Branch: Switch "at least one Actor unaffected" is OFF
  Game Over
 

Beregon

Veteran
Veteran
Joined
Aug 25, 2020
Messages
139
Reaction score
95
First Language
Czech
Primarily Uses
RMMZ
If it's just for some enemy troups, you can make a Troop Event that is triggered after each action and checks, if all party members are affected or not.

You can use something like this:

Code:
Turn switch "at least one Actor unaffected" OFF
Conditional Branch: Harold in Party
  Conditional Branch: Harold affected
    ..
  else
    Turn switch "at least one Actor unaffected" ON
  end
end

.. repeat for all Actors

Conditional Branch: Switch "at least one Actor unaffected" is OFF
  Game Over
You can do this without checking for individual actors and instead checking the actual party members, like this:

EDIT: Alright, the party member script calls don't seem to work like I thought, so here's some event commands and script calls you can use:

Control Variables > Set > Game Data > Party > Member 1

This will return the ActorId of whomever is the first party member and save it into a variable. If there's no one in that slot, it will return 0.

You can use this script call inside a conditional branch to check if the value of the variable is not 0 (meaning, if the slot isn't empty)

Code:
$gameVariables.value(1) !== 0;
Now, you can use this inside a conditional branch to check if the actor is affected by either Knockout status or Petrify:

Code:
$gameActors.actor($gameVariables.value(variableId)).isStateAffected(StateId-Knockout) || $gameActors.actor($gameVariables.value(variableId)).isStateAffected(StateId-Petrify);
 
Last edited:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

After hearing Wataten's opening several times and knowing what this anime is about, I don't think I like moe anymore.
So I am working on a big DLC package for my game.... and it will add a new intro and extend the ending of the base game, while of course adding additional content to the game... Yeah, that should work! lol
I'm stuck, I'm making some of Mr. N's Dialogue but I can't finish his full Dialogue...heres what I got now [this is the part I'm stuck on] "You treat me like a
bug, I'M SICK OF IT, you had me make these...abominations...well, now..." and at the "Well, now...' part I'm stuck at, anyone got Ideas?
Ami
--- Top Up ---

Merchant: Diamond Sword cost 100 Diamonds
F.Magic Knight
: I don't have Diamonds,what should we do?
M.Knight: I don't have any choice,i have to Buy Diamonds with my Card
F.Magic Knight
: You do?
(M.Knight's Balance Just Have 1.25)
M.Knight: (Chuckle) Maybe,later…

Forum statistics

Threads
107,547
Messages
1,030,422
Members
139,673
Latest member
WDRS
Top