How to set up a Weight Switch for two party members

I am trying to create a switch that will not activate unless the player has a party member with them. The idea is that the player will step on one switch and the party member that follows will "step" on the other.
I know party members can't actually interact with switches, so I designed it so that the switch would check if the player is facing one of two directions (left or right), while simultaneously checking if there is another party member. Once the switches are activated, it will cause the crystals on the right of the room, to play an animation and disappear, allowing access to the right side of the room. Otherwise, the floor switch will not remain depressed once the solo character walks off it. Here is a picture to better visualize what I'm trying to do:
1758646896442.png


However, I'm having trouble implementing it properly.
You can even simulate this with Switch, but the best would be to use Javascript to get the correct position of the follower:
  • $gamePlayer.followers().follower(id).x
  • $gamePlayer.followers().follower(id).y
(in place of id put the number corresponding to the follower)

Example (Parallel process):
Code:
◆If:Script:$gamePlayer.followers().follower(1).x == 4 && $gamePlayer.followers().follower(1).y == 8
  ◆Control Switches:#0011 Floor 1 = ON
  ◆
:Else
  ◆Control Switches:#0011 Floor 1 = OFF
  ◆
:End
◆If:Script:$gamePlayer.followers().follower(1).x == 5 && $gamePlayer.followers().follower(1).y == 8
  ◆Control Switches:#0012 Floor 2 = ON
  ◆
:Else
  ◆Control Switches:#0012 Floor 2 = OFF
  ◆
:End

In the collision event, you will only need to check the Switch that does not belong to it in each event.

Floor 1 (Page 1):
Code:
◆If:Floor 2 is ON
  ◆Control Switches:#0013 Open Gate = ON
  ◆
:End

Floor 2 (Page 1):
Code:
◆If:Floor 1 is ON
  ◆Control Switches:#0013 Open Gate = ON
  ◆
:End

Original thread: https://forums.rpgmakerweb.com/threads/how-to-set-up-a-weight-switch-for-two-party-members.180252/