VXAce PTB Script Call Question

Hello, i'm here for make a pretty silly question,

I´m trying to make some mechanics with the events, but i don't know how to get the character's id on turn


Let me explain, for example is the turn of the second character, when they execute an action, a common event is executed too, and in this i wanna know the actor's id or member's position of the actor that acted before and the actor that will act after them, but i don't know what script call can i use to get that id

I am using the PTB scripts: https://divisionheaven.me/material-list/rgss3/press-turn-battle-system/
So maybe the script has a script call for that, or maybe is needed another script to define a method like that? I don't really know xD

Eniweys, thanks for your attention!
bump
bump
solution here will probably be helpful.
solution here will probably be helpful.
It works! But it will just tell you the ID of the actor that is acting in this moment, now i would need a way to get the ID or member's position of the next actor that will act after them
The "\v[x] = a.id" only works for skills so i think i would need maybe a script call or something like that, but well i don't know too much of ruby code xD

Anyways, thank you a lot again!
bump
This will save the actors order to the variable and the current actor a variable
Spoiler: PTBN actor order array
Ruby:
module R2_PTBN_ORDER_LIST
  ACT_LIST = 90
  # Variable to hold the array of actor id's and their order
  ACT_APPLY = 91
  # Variable to hold the actor currently performing an action
end

module BattleControl
  class << self
    alias :r2_ptbn_sort_order  :ptbn_sort_battlers
    alias :r2_ptbn_sort_reset  :turn_end_ptbn
    alias :r2_ptbn_sort_setup  :setup_battle
  end
  def self.setup_battle
    r2_ptbn_sort_setup
  end
  def self.ptbn_sort_battlers
    r2_ptbn_sort_order
    if @ptbn_order == :party
      return if $game_variables[R2_PTBN_ORDER_LIST::ACT_LIST] != 0
      list = []
      @battlers.each do |act|
        list << act.id
      end
      $game_variables[R2_PTBN_ORDER_LIST::ACT_LIST] = list
    end
  end
  def self.turn_end_ptbn
    $game_variables[R2_PTBN_ORDER_LIST::ACT_LIST] = 0
    r2_ptbn_sort_reset
  end
end

class Game_Battler < Game_BattlerBase
  alias_method :obtain_actor_id_user, :item_apply
  def item_apply(user, item)
    $game_variables[R2_PTBN_ORDER_LIST::ACT_APPLY] = 0
    if user.is_a?(Game_Actor)
      $game_variables[R2_PTBN_ORDER_LIST::ACT_APPLY] = user.id
    end
    obtain_actor_id_user(user, item)
  end
end
Then you can do conditional branch checks for what you are trying to do.
1753411840715.png

Original thread: https://forums.rpgmakerweb.com/threads/ptb-script-call-question.178823/