RMMV What's the call for targeting specific party slots (not actors)...

Status
Not open for further replies.

zerobeat032

Cloaked Wanderer...
Veteran
Joined
Mar 28, 2014
Messages
388
Reaction score
670
First Language
English
Primarily Uses
RMMV
I've been stumped trying to figure out how to basically, through Yanfly's Action Sequences, to tell the game that if party member 3 is being targeted, turn on/off a certain switch. $gameParty.members()[2] is basically the 3rd slot if I remember right, but how do I say something like this... target.actorId() === 1 but for the party member slots instead of actor ID. I feel I'm close to what I need, but I can't quite figure it out.

If anyone know's what I'm missing, I'm all ears and thanks... enjoy your day folks.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
3,699
Reaction score
2,800
First Language
English
Primarily Uses
RMMZ
Couldn't you do

$gameParty.members()[2].actorId() === target.actorId()
 

zerobeat032

Cloaked Wanderer...
Veteran
Joined
Mar 28, 2014
Messages
388
Reaction score
670
First Language
English
Primarily Uses
RMMV
awesome! yeah that works. basically I have a switch that turns on and off the priority for actors and enemies and I needed it off whenever whoever the 3rd party member is, was targeted... that way the enemy wouldn't be standing on the second party member's head or something weird. annnd now it works! thank you so much! this is good to know in general actually, so yeah thanks.

EDIT: Well there's a hitch, it throws an error if there isn't a 3rd party member in that position... BUT, I found out there's a ridiculously easy way to do this which is so easy I literally didn't think it'd work...

target === $gameParty.members()[2]

that seems to work and it doesn't seem to matter if that slot isn't being filled in any particular battle.

this also works with...

target === $gameTroop.members()[1] and whatnot just incase anyone seeing this was wondering.
 
Last edited:

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
16,075
Reaction score
8,912
First Language
English
Primarily Uses
RMMV

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Profile Posts

Feel free to check out our "Touch the Stars" gamejam submission, "Starlight, Starbright!"
just finished playing one shot. im kinda disappointed with return the sun ending ngl. i was hoping there would be some after credits scene that would play with my emotions
So apparently the surprise Google Search page browser game saves your progress when you close the browser.

This really makes me miss the golden age of Flash gaming.
ohh man im ending oneshot now (im doing the last stepping puzzle rn) and the music is so...sad...like...ive been thinking recently about how fast moments pass and...my anxious thoughts combined with that music and nostalgia...like...im comfortably sad...and want to cry internally
We're playing one of the Touch the Stars game jam entries, come join us!

Forum statistics

Threads
113,557
Messages
1,075,814
Members
147,552
Latest member
Pliskin
Top