Status
Not open for further replies.

neiljwd

Villager
Member
Joined
Nov 11, 2013
Messages
10
Reaction score
0
First Language
English
Primarily Uses
Hello I'm new :) Hoping this request isn't too much Script request, and that i've posted it in the right place! :)
 
What I'm wanting to do in RMXP ( I have a legit 1.04 version) is change actor's positions in a party, via an event script call. This is outside of battle.
I found TWO posts on this site that are very nearly what I need, but they are for RMVX, my request is for RMXP.

This 1 concerning battle. and THIS ONE

In the second Shez has posted

$game_party.swap(0, $game_actors[2].index)I think this is exactly what I want.

I want to be able to choose an actor by ActorID, and manually place them in my preffered party position. Sadly it didn't work for me in RMXP.

Can anyone proffer a fix please? Pretty Please!? :guffaw:

As a side note I am running leon's party changer script, spoilered here just in case it matters, as I know its functionality broadly covers this area.

Linked as I can't see how to spoiler, sorry.

EDIT realised this request may be pointless if I can't store variables via Party ID, only Actor ID.

IS it possible to make a script call that Say sets - Variable[5] tog ame_party_actor[2]'s Strength stat? Or can variables only be set via actor ID in an event?
 
Last edited by a moderator:

Raxus

Villager
Member
Joined
Aug 3, 2013
Messages
17
Reaction score
11
First Language
English
Primarily Uses
Forgive me if I am wrong, but can't you just make an event that removes both party members then add them in the exactly sequence you want? I mean, events can be easier than scripts most of the time. ;)
 

neiljwd

Villager
Member
Joined
Nov 11, 2013
Messages
10
Reaction score
0
First Language
English
Primarily Uses
Yeah but I have 20 odd party members, would have to remove all 20+ each time, and re add, just worried at the possible slowdown and effort.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,408
Reaction score
15,212
First Language
English
Primarily Uses
RMMV
The $game_party.swap_order method can pretty much be copied from Ace to XP and used in exactly the same way.

Add this to a new script slot:

class Game_Party def swap_order(index1, index2) @actors[index1], @actors[index2] = @actors[index2], @actors[index1] $game_player.refresh endendAnd in a Call Script command, put
Code:
$game_party.swap_order(0, 3)
to swap the positions of the first and fourth party member. Remember the index begins at 0, not 1.
sets - Variable[5] tog ame_party_actor[2]'s Strength stat
Code:
$game_variables[5] = $game_actors[2].str
 

neiljwd

Villager
Member
Joined
Nov 11, 2013
Messages
10
Reaction score
0
First Language
English
Primarily Uses
Ah it's Shaz, the originial inspiration  for my post!

Looking good so far, the implemented script works, and I can use the script command you posted.

However what I'm looking to do is  Choose by  ACTOR ID, and put them into my Chosen Party slot, Like for that previous poster you posted this:

$game_party.swap(0, $game_actors[2].index)

I tried cutting&pasting it into  a script call, but it gave me a syntax error. I spent 25 minutes hacking and slashing at the script but I had no idea what I was doing, so of course got nowhere.

So forgive me but could you please address this for me, if it is at all possible to do so?
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,408
Reaction score
15,212
First Language
English
Primarily Uses
RMMV
That is exactly the call you would make. But the method is called swap_order, not just swap. So this:

Code:
$game_party.swap_order(0, $game_actors[2].index)
would put actor 2 in the first position (0) and put whatever actor WAS in that position, wherever actor 2 was.
 

neiljwd

Villager
Member
Joined
Nov 11, 2013
Messages
10
Reaction score
0
First Language
English
Primarily Uses
User_The_Scythe_Has_Fallen_Cookie.png


For you Shaz.

My humblest thanks. This is great, I'm all sorted now. Ta so very much :) :)

Edit I noticed you live in Australia, so I got you this instead:

3648431-399526-fly-swatter.jpg


Help you squish some of them deadly pests like you squished my bug :p :p
 
Last edited by a moderator:

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,408
Reaction score
15,212
First Language
English
Primarily Uses
RMMV
lol! That could come in really handy over here :D


This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

Latest Threads

Latest Profile Posts

Tiamat-86 wrote on ATT_Turan's profile.
apparently since its turning 15 years old this year the ps3 is considered "retro". now how old do you feel?
guess that means im an "antique" gamer since ill still play games as old as i am.
"you know your getting old when your childhood console changes ethnicity" lol it turned yellow
I'm making Toilet in Wonderland 2. and tell vinny about it lol
WE ARE THE BORG. YOUR BIOLOGICAL AND TECHNOLOGICAL DISTINCTIVENESS WILL BE ADDED TO OUR OWN. RESISTANCE IS FUTILE.
D2R save files are so broken. how was the beta test better then the full release. blizzard's last hope crashed and burned.
they're getting no more chances from me.

Forum statistics

Threads
115,338
Messages
1,089,140
Members
150,013
Latest member
keda27
Top