Help - Search - Members - Calendar
Full Version: Party Members with Different Powers
RPG RPG Revolution Forums > Game Engines > RPG Maker XP Discussion
BurntSquirrelMan
Okay...Try and bare with me.

I want to make it so you can switch between characters, so that different characters get different responses from people, and different characters have different powers.

I have it so that you can switch between characters. That was easy.

But what about the other problems?

I want it so that, when you are Chet, the main character, and you talk to an aimless wanderer, they say "Oh. Hi, Chet. What do you want?"

But when Kazzong, the secondary character, talks to the aimless walker, they say, "Oh! Hello, Kazzong! You're looking handsome today!"

I also want it so that Banshee, a lieutenant of the army, will allow you to jump long distances, and that Nakki, a lone fighter, can allow you to break large objects.

Now, I know how I'm going to do this. I'm using Blizz ABS to do this. One of the things you can do with it is have a conditional branch that allows for when you push a certain button.

I want a conditional branch that when you push 'P', which is the button that swaps characters, it will change a variable to a certain number depending on what it was before the change.

EX: When you are Chet, the variable = 1.

When you press 'P', it changes you to Kazzong, and changes the variable to 2

When you press 'P' again, it changes you to Banshee, and changes the variable to 3

And then one more time brings you back to Chet, and brings it down to 1

This will allow me to have it so that when Variable = # this happens.

Where was I..?

Oh yeah! My problem!

My problem is I can't get the coding to work. The Script should be:

Conditional Branch: Script: Input::Select
Text: It works!
Branch End

But when I push the Select button (P), nothing happens. I've tried a bunch of different combinations and none work. Some even give me errors.

What code should I put in place of "Input::Select" to make it work?

(PS: Sorry It took me so long to explain that...)
Fallen-Griever
For the speech thing, you just need to set-up a variable that is altered whenever the lead character is changed. Then use a conditional branch in every dialogue event that checks this variable and executes the relevant speech.

Since I don't know how you are changing the party leader, I can't really be more specific.
LaDestitute
Wouldn't it be easier (my personal choice) to use conditonal branch's "if in party" check?
Kread-EX
Try with Input.trigger?(Input::Select). Input::Select is just a number so by itself it does nothing. Input.trigger? checks if a key is pressed.
Fallen-Griever
QUOTE
Wouldn't it be easier (my personal choice) to use conditonal branch's "if in party" check?

All these people can be in the party at the same time: It is the leader that needs to be tracked.
Teriki Tora
There's a simple script that I grabbed from around these boards that really helps (I don't remember who I got it from, I forgot to add it to the credits and the person didn't put the credit to it) --- (Found it, Callista, made it... as far as I know)

This goes into your MAIN script above the existing code.

CODE
#==============================================================================
# ** Main
#------------------------------------------------------------------------------
#  After defining each class, actual processing begins here.
#==============================================================================

class Game_Actor
  attr_reader :actor_id
end

class Game_Party
  def get_actor_position(actor_id)
    for i in actors
      return i.index if i.actor_id == actor_id
    end
  end
end

# get_actor_position(#) is the actor ID Actor 1 in my game is Teri
# The number after the == is the position, remember to subtract one from the
# known number
#
# $game_party.get_actor_position(X) == Y
# Where X = the Party Member/Actor ID, and Y = the position or slot
# Slot 1 is 0, Slot 2 is 1, etc.
# Use Conditional statements to check where each actor is for CORRECT cutscenes


I added the extra stuff at the end. Use a Conditional statement in your event to determine if a certain character is in the first party slot. Say, for example, you have "Barky McBarkenstuff" as your first character slot, but he's your 8th Party member (as according to your actor IDs). I would need this:

if script $game_party.get_actor_position(8) == 0
{
Text: Hiya doggy! :3
}
Else
{
Text: How's it going? Mind if I ask you to look at my goods?
}

That should help determine which actor is where in your party. (Script compatibility should be 100%, I have other scripts added on and this little script doesn't mess up anything)
BurntSquirrelMan
YES!

*does happy dance*

It works! Thank you guys, for your help. Thank you Teriki, I went with your...idea...thingy...Thanks.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.