Getting party position of an actor id

Hello I have the following problem.

Let's say I summon a creature, the creatures dies at some point. When the creature it should automatically be removed fromhahe party with apropriate animation. So of course I have to decide, to which actor whe animation goes, it seems like there is no basic function that allows you to play animations on actors, what a shame.
So I have to use an script call to play an animation. But as far as I can see the script call: "$gameParty.members()[1].startAnimation(120,true,0)" for example definitely wants the position of the party member in the array where the animation is played.

So it looks like I have to build something.
So what I thought about is that after the creature gets summoned, I store the party position of the creature in an variable. So I can later use that variable in the array, to play the animation on the summoned creature. But how am I able to store the position of the actor I summoned? Is there any command to that?

I also would appreciate easier solutions.
How are you doing the summon itself?
How are you doing the summon itself?

simply by adding an party member and if the party is full, the summoning will not be executed.
the only difference between summoned creatures and "real" party members is, that you can't revive summoned creature because they get removed from the party on dead. You would have to summon them anew.
Okay, so the summoned creature would always be the last member of the party? In that case, you could do $gameParty.members()[$gameParty.members().length - 1].actorId()
Ok this gives me the actor id, but how do I get the position of the actor with the id? Or is it possible to cast an battle animation on a certain actor via script call? Because then I wouldn't need the position of the summoned creature to cast animations on them.
Not used it myself, but the script calls give:

$gameParty.members().indexOf($gameActors.actor(ACTORID))

to check party index of a character. You could use this in a the script part of a "Control Variables" editor command. If you knew which number "ACTORID" was, then you would use the number in place of "ACTORID". If you had the actor id whose party index you were looking for stored in a variable, you could use something like:

$gameParty.members().indexOf($gameActors.actor($gameVariables.value(20))

to check the party index of the actor whose id is held in variable 20.

https://forums.rpgmakerweb.com/index.php?threads/rpg-maker-mv-script-call-list.46456/

Original thread: https://forums.rpgmakerweb.com/threads/getting-party-position-of-an-actor-id.124842/