Lead Actor Swapper script error
#10
(Yesterday, 10:55 AM)kyonides Wrote: Err, nope, the default Game_System script has never included the @lead_actor variable at all. And it's not supposed to anyway. Happy with a sweat

Clearly, not paying attention as I posted a portion of Sheol's script:

(09-01-2025, 01:56 AM)DerVVulfman Wrote:
Code:
class Game_System
  #--------------------------------------------------------------------------
  # * Alias Listing
  #--------------------------------------------------------------------------
  attr_reader :lead_actor
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  alias slipknot_las_init initialize
  #--------------------------------------------------------------------------
  # * Initialize
  #--------------------------------------------------------------------------
  def initialize
    slipknot_las_init
    @lead_actor = 0
  end

Here, we can see that the value is indeed created within Game_System within its 'initialize' method.

Here I pointed out pointed out that lead_actor value is created by the Game_System 'alias'ation within Sheol's script. And nope, I never touched or altered the script. So it is in its innate form.

(Yesterday, 10:55 AM)kyonides Wrote: Once you moved the script to the bottom but just above Main, it should have worked normally. Confused
Now THAT is 100% true. The hierarchy of the scripts are essentially top-down. So the first thing that loads are the default scripts at the very top... and then works its way down. If you have a script that rewrites Game_System and then a script that attaches code to Game_System (like Sheol's), the result would be a Game_System that contains both. If you have it in reverse (the alias, then the rewrite), then the changes made by the alias are moot and only the rewrite exists.

(Yesterday, 10:55 AM)kyonides Wrote: Usually, we scripters don't need to make this request, still, I think we might need to take a look at your blank project's Data.rxdata file that includes the actor swapper script. Perhaps you forgot to mention something or you've altered some default or custom script and now it's causing you all these issues now.

We may indeed need to see your project. But it would need contain the entire script package as there may be other scripts in play.

BEFORE this, try this:

Make a copy of your project for a test procedure. Within the separate test project, see what happens when you delete the caterpillar script. If there is still an issue, the caterpillar script is not the problem. Following that, delete another custom script, and test once more. Continue deleting custom scripts until the it works correctly, the last custom script being the problem.

If it cannot be narrowed down, then examination of the project will be needed.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply


Messages In This Thread
Lead Actor Swapper script error - by Ace_V - 08-29-2025, 07:32 AM
RE: Lead Actor Swapper script error - by kyonides - 08-30-2025, 05:01 AM
RE: Lead Actor Swapper script error - by kyonides - 08-30-2025, 10:01 PM
RE: Lead Actor Swapper script error - by Ace_V - 08-31-2025, 07:44 AM
RE: Lead Actor Swapper script error - by kyonides - 08-31-2025, 10:11 AM
RE: Lead Actor Swapper script error - by Ace_V - Yesterday, 09:33 AM
RE: Lead Actor Swapper script error - by DerVVulfman - Yesterday, 02:26 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Actor Voices by diamondandplatinum3, note-tag commands not working! Starmage 1 432 08-04-2025, 09:02 AM
Last Post: Starmage
   Plugin or Script help with Item menu, SKill menu, and Equip menu JayRay 3 2,694 11-22-2024, 07:02 PM
Last Post: JayRay
   Atoa ACBS, Equipment Set Add-on Error Solitaire 10 5,770 10-13-2024, 11:41 PM
Last Post: Solitaire
   Personal graph by actor zlsl 4 7,853 10-23-2021, 06:43 AM
Last Post: zlsl
   Script compatibility help Lord Vectra 3 7,036 07-25-2021, 11:42 PM
Last Post: DerVVulfman
   Adding face script on Cogwheel's RTAB Battle Status rekkatsu 15 22,185 08-25-2020, 03:09 AM
Last Post: DerVVulfman
   "Wait" in the script Whisper 13 21,514 04-28-2020, 04:06 PM
Last Post: Whisper
   Skill Cooldown script Fenriswolf 11 21,438 12-10-2019, 11:10 AM
Last Post: Fenriswolf
   (RMVXace) Battle error with Tankentai's battle system, help. x( Starmage 0 5,026 02-14-2018, 04:25 PM
Last Post: Starmage
   Help iwth script (RGSS Player crash) Whisper 3 10,399 06-17-2017, 05:03 PM
Last Post: Whisper



Users browsing this thread: 2 Guest(s)