MV lunatic moted selecting state affected allies

i am using 2 states to kinda bind an enemy and an actor. that the enemy dies when the actor dies and the other way around. i am using this in the actors state
Code:
if (target.hp <= 0) {
  var enemies = origin.opponentsUnit().aliveMembers();
  for (var i = 0; i < enemies.length; ++i) {
       var enemy = enemies[i];
       if (enemy.isStateAffected(26)) {
           enemy.startAnimation(161);
           enemy.setHp(0);
           enemy.clearResult();
           enemy.performCollapse();
       }
  };
}
and its working perfectly. the enemy dies when the actor dies. but it wont work the other way around. thats the enemys state
Code:
if (target.hp <= 0) {
  var members = origin.???Unit().aliveMembers();
  for (var i = 0; i < members.length; ++i) {
       var actor = members[i];
       if (actor.isStateAffected(25)) {
           actor.startAnimation(161);
           actor.setHp(0);
           actor.clearResult();
           actor.performCollapse();
       }
  };
}
i dont know how to call on actors
i dont know how to call on actors
JavaScript:
$gameActors.actor(1)
// this is actor 1
JavaScript:
$gameParty.leader()
// this is the Group Leader (actor)
you can find a lot of Helpful Scriptcalls here:
Usefull Scriptcalls Info (Page is not made by me)
alternative Scriptcall List (Page is not made by me)

Example :
JavaScript:
       if ($gameActors.actor(1).isStateAffected(25)) {
           $gameActors.actor(1).startAnimation(161);
           $gameActors.actor(1).setHp(0);
           $gameActors.actor(1).clearResult();
           $gameActors.actor(1).performCollapse();
       }
Also try to use the Console f8 and use things like :
"$gameActors.actor(1)" (enter)
to find out how they are related to other things within Your System
Screenshot_6.png


Edit 1
another Example for Console f8 with using :
"$gameActors" (enter)
Screenshot_7.png


Edit 2
SideNote:
JavaScript:
$gameActors._data.length;

// returns the Number of Actors in Your Project
example Img:
Screenshot_8.png

Original thread: https://forums.rpgmakerweb.com/threads/lunatic-moted-selecting-state-affected-allies.129328/