Checking for a summoned actor in battle.

So...

I have SRD_SummonCore, Jay_BattleVAManager, and Yanfly action sequences.

I wanted to have an if-else statement in terms of the summon voice clips reacting to different things upon summon.

One condition is if the summoner is low on health. The other is if another actor acting as a summoned character is in battle.

How I have it is...

if $gameActors.actor(x).hpRate <= [number]
VOICE target: voicetag
else if $gameParty.battleMembers().indexOf($gameActors.actor(y)) > -1
VOICE target: voicetag
else
VOICE target: voicetag
end

The summoned actor I want talking is the target as seen in the statement. The low health reaction to actor x works... But it seems to skip over the “else if” condition despite actor y being present and goes straight to the last “else”.

The main party is full with four members and I assume the summoned actors act as reserve members? I don’t know.

Am I writing this wrong?
Instead of $gameParty.battleMembers, look for the actor in $gameParty.summonMembers()
So then that would make the condition...

$gameParty.summonMembers().contains($gameActors.actor(y))

...Right?
Should do it - I suspect it would take less time to test it in the game than to post and wait for a response 😛

Does it do what you want?
Unfortunately the call here isn't working.

I want a summoned actor to react to the presence of another summoned actor brought in before the recent one; same turn or otherwise.

Party member 1 summons the first actor. Party member two summons the second one.

The second one plays a voice clip reacting to seeing the first one.
Try a loop, just to make sure it isn't some weirdness with the array.

Code:
for (var i=0; i<$gameParty.summonMembers().length; i++
{
    if ($gameParty.summonMembers()[i] === $gameActors.actor(actorId))
        play your voice file or pop up a test text window or something
}

Unless I'm misreading something in the plugin.
Try a loop, just to make sure it isn't some weirdness with the array.

Code:
for (var i=0; i<$gameParty.summonMembers().length; i++
{
    if ($gameParty.summonMembers()[i] === $gameActors.actor(actorId))
        play your voice file or pop up a test text window or something
}

Unless I'm misreading something in the plugin.
Fell asleep; how is a loop done in an if-else statement? Do I copy this right after the "else if" part?
You would have to make a function out of it and save it as a plugin, then call that function in the conditional branch in the event.

But really, what you had before should work - can you post screenshots of the event and the summoning skills?
You would have to make a function out of it and save it as a plugin, then call that function in the conditional branch in the event.

But really, what you had before should work - can you post screenshots of the event and the summoning skills?
It's not really an *event* as I have to put everything in the notes of the skill.

1615484105568.png


The plugin reads the notes and works out the function from there.
That said... This is what I put.

Code:
<Summon>
Actor ID: 16
Level: actor.level
Turns: 1
Animation: 122
Exit Animation: 121
<End Summon>
<Instant>
<setup action>
VOICE user: persona, partnertrue
</setup action>
<follow action>
add state 57: user
</follow action>
<finish action>
if $gameActors.actor(15).hpRate() <= 0.23
  VOICE target: lowhpcomment
else if $gameParty.summonMembers().contains($gameActors.actor(8))
  VOICE target: seekercomment
else
  VOICE target: summoned
end
</finish action>
<cgmvencyclopediahide>
<Hide in Field>

EDIT: I just realized I forgot to put the actor ID for Y. Fixed that.
I can verify that doesn't work for me, either. Sorry, I don't know if I'm misreading something in the plugin, but I don't have another suggestion.

You know SumRndmDde does have contact information listed on his Web site, right? For how long this has taken, have you just e-mailed him to ask?
I can verify that doesn't work for me, either. Sorry, I don't know if I'm misreading something in the plugin, but I don't have another suggestion.

You know SumRndmDde does have contact information listed on his Web site, right? For how long this has taken, have you just e-mailed him to ask?
I haven't contacted and it's just of recent.

Original thread: https://forums.rpgmakerweb.com/threads/checking-for-a-summoned-actor-in-battle.134191/