Hi all!
Can someone please try and help me? I Use a system where you can cycle through the party so you can chose who is your leader.
To cycle to the right I have the following:
This cycle through the right and when it goes to the last party member it starts over with the party member at 0 index.
To cycle to the left i have this:
This does the exact same thing but in reverse, (to the left).
Now, everything works super fine, I can add more party members and it works, BUT NOT when I remove members, when I remove, SOMETIMES it works, and sometimes it doesn't.
When it goes wrong, BOTH functions go wrong and they skip members.
So I dont know why removing members SOMETIMES screws the functions .
Hope someone can catch where im wrong.
THANKS!
Can someone please try and help me? I Use a system where you can cycle through the party so you can chose who is your leader.
To cycle to the right I have the following:
Code:
function partycycleR() {
for (var i = 0; i < $gameParty.members().length - 1; i += 1) {
$gameParty.swapOrder(i, i+1)
}
}
To cycle to the left i have this:
Code:
function partycycleL() {
last = $gameParty.members().length - 1
another = 1
$gameParty.swapOrder(0, last)
for (var i = 0; i < $gameParty.members().length - 2; i += 1) {
$gameParty.swapOrder(last - i, last - another)
another += 1
}
}
This does the exact same thing but in reverse, (to the left).
Now, everything works super fine, I can add more party members and it works, BUT NOT when I remove members, when I remove, SOMETIMES it works, and sometimes it doesn't.
When it goes wrong, BOTH functions go wrong and they skip members.
So I dont know why removing members SOMETIMES screws the functions .
Hope someone can catch where im wrong.
THANKS!