Main Menu
  • Welcome to The RPG Maker Resource Kit.

[RESOLVED] Switching party order

Started by Atracious, January 04, 2008, 04:04:58 AM

0 Members and 1 Guest are viewing this topic.

Atracious

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!
"Facts are useless. You could use facts to prove anything that's even remotely true." Homer Jay Simpson

"I do not know what weapons WWIII will be fought with but i know WWIV will be fought with sticks and stones" Albert Einstein

"It's better to have loved and lost than never to have loved at all." from In Memoriam, by Alfred, Lord Tennyson.

"all your base are belonging to us!" awful fantasy 3

"the grapes damb it, it's alway's the grapes!"

Funny anagrams:
Desperation=A rope ends it
Mother in law=Woman hitler
Lottery machine=Money lost in 'em
Election results=Lies lets recount
Dormitory=Dirty room
Snooze alarms=Alas! No more Z's
Eleven plus two=Twelve plus one
Cosmetic surgery="Yes, I correct mugs."
The IRS=Theirs!
Public relations=Crap, built on lies
Astronomer=Moon starer
Dementia="Detain me."
Internet chat rooms=The moron interacts
The eyes!=They see!

Currently making:
http://rmrk.net/index.php/topic,13132.0.html

Leon_Westbrooke

#1
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)


Atracious

#2
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] = @variable0

this reverses the order....thank you!
"Facts are useless. You could use facts to prove anything that's even remotely true." Homer Jay Simpson

"I do not know what weapons WWIII will be fought with but i know WWIV will be fought with sticks and stones" Albert Einstein

"It's better to have loved and lost than never to have loved at all." from In Memoriam, by Alfred, Lord Tennyson.

"all your base are belonging to us!" awful fantasy 3

"the grapes damb it, it's alway's the grapes!"

Funny anagrams:
Desperation=A rope ends it
Mother in law=Woman hitler
Lottery machine=Money lost in 'em
Election results=Lies lets recount
Dormitory=Dirty room
Snooze alarms=Alas! No more Z's
Eleven plus two=Twelve plus one
Cosmetic surgery="Yes, I correct mugs."
The IRS=Theirs!
Public relations=Crap, built on lies
Astronomer=Moon starer
Dementia="Detain me."
Internet chat rooms=The moron interacts
The eyes!=They see!

Currently making:
http://rmrk.net/index.php/topic,13132.0.html

Leon_Westbrooke

Nice to see you got it. it had squares because i used [ x ]