I looked all over and i couldn't find anything so here goes: I want to know how to change a party members position in a script, and also in an event if possible (i couldn't see anything to do with positions....)
for example: i have 4 party members: A B C D, and i want to change it to: D A B C, so that i can refer to character D as actor '0' instead of character A. Currently i am using a variable to store the position and just using that....but it won't do, i need to change the actual position set by the system. Thanks in advance!
You use a variable swap:
@variable = $game_party.actors[z]
$game_party.actors[z] = $game_party.actors[y]
$game_party.actors[y] = @variable
That should work in an event, where z and y = 0-3 (actors 1, 2, 3, 4, respectivly)
Quote from: Leon_Westbrooke on January 04, 2008, 04:19:18 AM
You use a variable swap:
@variable = $game_party.actors
$game_party.actors- = $game_party.actors[y]
$game_party.actors[y] = @variable
That should work in an event, where x and y = 0-3 (actors 1, 2, 3, 4, respectivly)
looks like there was something cut out of that..... has weird square in there
edit: i got it to work:
@variable0 = $game_party.actors[0]
@variable1 = $game_party.actors[1]
@variable2 = $game_party.actors[2]
@variable3 = $game_party.actors[3]
$game_party.actors[0] = @variable3
$game_party.actors[1] = @variable2
$game_party.actors[2] = @variable1
$game_party.actors[3] = @variable0this reverses the order....thank you!
Nice to see you got it. it had squares because i used [ x ]