I'm using Selchar's Equipment Durability scripts, and I want to create a Repair skill as an alternative to using the Equip Repair Scene. (This question doesn't have much to do with those scripts, but this is the scenario that helps explain what I'm doing)
I've created a Repair Sword skill, which requires a sword to be equipped, and I've set it up to call a common event. I've also set the Occasion field to "Only from the Menu".
In the common event, I can set up a script call to do this:
a = $game_actors[1].equips[0]
a.repair
This works perfectly, as long as I have one actor in the party. I can invoke the skill from the menu (press ESC, select Skills, select actor 1, and select the Repair Sword skill), and it works - but it's hardcoded to work on actor 1. When I have more than one actor in the party, I don't know how to detect which actor was selected from the menu. I've searched through the RGSS reference material in the Help system, and I don't see how to do this.
Can anyone point me in the right direction?
I've created a Repair Sword skill, which requires a sword to be equipped, and I've set it up to call a common event. I've also set the Occasion field to "Only from the Menu".
In the common event, I can set up a script call to do this:
a = $game_actors[1].equips[0]
a.repair
This works perfectly, as long as I have one actor in the party. I can invoke the skill from the menu (press ESC, select Skills, select actor 1, and select the Repair Sword skill), and it works - but it's hardcoded to work on actor 1. When I have more than one actor in the party, I don't know how to detect which actor was selected from the menu. I've searched through the RGSS reference material in the Help system, and I don't see how to do this.
Can anyone point me in the right direction?

