Checking if an actor in a certain party position in an IF statement.

Yougotsomechocolate

Random Chest
Veteran
Joined
Jan 29, 2019
Messages
215
Reaction score
91
First Language
English
Primarily Uses
RMMV
For example, If actor 1 is in the second position, then the statement would be true.
Basically Checking if an actor is in a active spot in the party, and where they are using a script or plugin command.
 

JamesRyan

Game Designer
Veteran
Joined
Sep 13, 2014
Messages
697
Reaction score
216
First Language
Vietnamese
Primarily Uses
RMMV
Maybe this will work:
Code:
$gameActors.actor(x) === $gameParty.members()[y]
With x = your actor's ID and y = your party member index.
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,729
Reaction score
4,685
First Language
English
Primarily Uses
RMMZ
If you are simply checking in general, here's the code. In battle, it will only check the battle members, and when not in battle it will check all members in the party.
Code:
$gameParty.members()[x].actorId() == y

// x = position in the game party
// y = Id (from the database ofc) of the actor
 

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

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,050
Messages
1,018,548
Members
137,835
Latest member
yetisteven
Top