The RPG Maker Resource Kit

RMRK RPG Maker Creation => XP => Topic started by: The Shadow on June 05, 2010, 04:38:55 PM

Title: [Help Eventing XP] Change party members
Post by: The Shadow on June 05, 2010, 04:38:55 PM
Im trying to create a change party system through events. The system includes 3 characters, each with their own abilities(One can move heavier rocks, one can read some books, ect). The main idea of this system is to have the 2 other characters walking behind one, similar to a cartepillar system. When you press Z, you will change to character behind you( If the characters stands in one line, you will change to the one behind you, and the old character will go to the back of the line). If you press Z again, you will change to the next character, and so on.

However, I don't get it to work. When I press the Z button, it's switches to the second character, but instantly switches back the first character again. Sometimes, it switches to the third character instead of the second.

I don't know if it's the Switches Im using that bugging out eachother. I tried with Variables, but it didn't work either. So I wonder how I shoud event this, because Im stuck.

Sorry if it sounds confusing, but it's hard to explain with my bad english.
Title: Re: [Help Eventing XP] Change party members
Post by: Mishka on June 05, 2010, 04:42:11 PM
http://forum.chaos-project.com/index.php/topic,164.0.html

This might be what you're looking for, then.
Title: Re: [Help Eventing XP] Change party members
Post by: The Shadow on June 05, 2010, 05:20:13 PM
Well, it solves the character switch, but not the whole problem.

You have 3 characters in your party, Hera, Daniel and Sara. When you swich over to Daniel, you can move rocks. When you have switched over to Hera or Sara, you can't move rocks. How do I solve that?
Title: Re: [Help Eventing XP] Change party members
Post by: Mishka on June 05, 2010, 05:29:45 PM
Well, it solves the character switch, but not the whole problem.

You have 3 characters in your party, Hera, Daniel and Sara. When you swich over to Daniel, you can move rocks. When you have switched over to Hera or Sara, you can't move rocks. How do I solve that?
Not quite sure, but I'm sure it can be handled through a variable (via a script call, of course).

I don't have a lot of experience with party-based environments, as my games are usually ABS games with only one person in the party at all times.
Title: Re: [Help Eventing XP] Change party members
Post by: cozziekuns on June 05, 2010, 05:50:16 PM
Just make a check to see if the lead character is the guy you want (in this case, Daniel). Make a simple script call like this:

Code: [Select]
$game_variables[Whatever variable ID] =
$game_party.actors.empty? ? 0 :
$game_party.actors[0].id

So that if Daniel's Actor ID is 3, then the variable that you set will also be 3. Then you can just check that with conditional branches and what not.
Title: Re: [Help Eventing XP] Change party members
Post by: The Shadow on June 05, 2010, 06:02:09 PM
Just make a check to see if the lead character is the guy you want (in this case, Daniel). Make a simple script call like this:

Code: [Select]
$game_variables[Whatever variable ID] =
$game_party.actors.empty? ? 0 :
$game_party.actors[0].id

So that if Daniel's Actor ID is 3, then the variable that you set will also be 3. Then you can just check that with conditional branches and what not.

Is the "?" supposed to be something else?
Title: Re: [Help Eventing XP] Change party members
Post by: cozziekuns on June 05, 2010, 06:08:58 PM
Nope. The Whatever variable ID is, but you probably already knew that.
Title: Re: [Help Eventing XP] Change party members
Post by: The Shadow on June 05, 2010, 06:41:34 PM
Yes I did.

But it still dosen't work. All 3 can still move the rock.
Title: Re: [Help Eventing XP] Change party members
Post by: cozziekuns on June 05, 2010, 06:44:10 PM
Hmm.. That's weird. Can I see your events?
Title: Re: [Help Eventing XP] Change party members
Post by: The Shadow on June 05, 2010, 06:55:00 PM
This is the event for the rock:
Spoiler for:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi94.photobucket.com%2Falbums%2Fl104%2FDennis88_2006%2Fertyu.png&hash=3317ca800f18dc2cf953570fdb699763ae95af09)

I have another event with a Call Common Event for the script.
Title: Re: [Help Eventing XP] Change party members
Post by: Mishka on June 05, 2010, 07:11:44 PM
The problem is that you have the variable set to equal itself... and Variable X is always equal to variable X.

It is one of the algebraic properties!
Title: Re: [Help Eventing XP] Change party members
Post by: cozziekuns on June 05, 2010, 07:13:34 PM
Yeah, Mikhail's right. What's Daniel's Actor ID? For example, if his Actor ID is 2, change it to:

Conditional Branch: Variable [0002] == 2
  Blah Blah Blah
  Else
  I'm too weak to move this one
Branch End

Maybe I didn't explain it too well. If that's the case, I'm sorry.
Title: Re: [Help Eventing XP] Change party members
Post by: The Shadow on June 06, 2010, 03:30:31 PM
That's okay :). It works perfectly now. Thanks for the help.