Posts: 92
Threads: 10
Joined: Nov 2024
Hi! I tried implementing the Lead Actor Swapper script by Sheol:
https://www.save-point.org/showthread.php?tid=6559
But when I tried swapping a character out using the Q button (L on a gamepad), I encounter an error on line 64:
Code: $game_system.lead_actor = ($game_system.lead_actor - 1) % $game_party.actors.size
I use a caterpillar script, could that be the problem? I was hoping I could swap/change character's party positions using the script and they would also swap on the caterpillar.
Posts: 4,853
Threads: 586
Joined: Dec 2009
Is that really all the information the popup window has provided you with?
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
My Original Stories (available in English and Spanish)
List of Compiled Binary Executables I have published...
HiddenChest & Roole
Give me a free copy of your completed game if you include at least 3 of my scripts!
Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE
Posts: 12,553
Threads: 1,732
Joined: May 2009
Yesterday, 02:08 PM
(This post was last modified: Yesterday, 02:10 PM by DerVVulfman.)
I'm wondering.....
Code: $game_system.lead_actor = ($game_system.lead_actor - 1) % $game_party.actors.size
Is this an issue where it tries to go FROM lead_actor #0 and attempts to incorrectly generate lead_actor #-1
I think you could go two different ways:
>> If you cannot go below actor #0 or past the party limit -- no cycling <<
Code: def update
slipknog_las_update
# Button input adjustments to lead actor
$game_system.lead_actor += 1 if Input.trigger?(Input::R)
$game_system.lead_actor -= 1 if Input.trigger?(Input::L)
# Get max party size limit
sz_limit = $game_party.actors.size - 1
# Keep lead actor in range
$game_system.lead_actor 0 if $game_system.lead_actor < 0
$game_system.lead_actor sz_limit if $game_system.lead_actor > sz_limit
end
>> Allow cycling, on going below actor #0... or past party limit... -- no cycling <<
Code: def update
slipknog_las_update
# Button input adjustments to lead actor
$game_system.lead_actor += 1 if Input.trigger?(Input::R)
$game_system.lead_actor -= 1 if Input.trigger?(Input::L)
# Get max party size limit
sz_limit = $game_party.actors.size - 1
# Keep lead actor in range
$game_system.lead_actor sz_limit if $game_system.lead_actor < 0
$game_system.lead_actor 0 if $game_system.lead_actor > sz_limit
end
Again, I am still without my main PC and RPGMaker.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
Above are clickable links
Posts: 4,853
Threads: 586
Joined: Dec 2009
8 hours ago
(This post was last modified: 8 hours ago by kyonides.)
(Yesterday, 02:08 PM)DerVVulfman Wrote: I'm wondering.....
Code: $game_system.lead_actor = ($game_system.lead_actor - 1) % $game_party.actors.size
Is this an issue where it tries to go FROM lead_actor #0 and attempts to incorrectly generate lead_actor #-1
And that's hoping there's no such issue as a NilClass error message because Game_System never owned any lead_actor method or @lead_actor being set to nil (the default value)...
So Ace_V, was there any specific error message mentioned in your popup window or backtrace script? Can you post it here as is?
It's just to make sure nobody is skipping or ignoring any vital details here...
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
My Original Stories (available in English and Spanish)
List of Compiled Binary Executables I have published...
HiddenChest & Roole
Give me a free copy of your completed game if you include at least 3 of my scripts!
Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE
|