Main Menu

how do I have a character level up whenever another character levels up.

Started by Tenkle, June 05, 2008, 09:51:16 PM

0 Members and 1 Guest are viewing this topic.

Tenkle

Could anyone tell me how to have it so when a character levels up another character does also.

For isntance say that I want a character to leave the party and come back later in the game. I would want to have the character at a similar level to the main character. So I would want to set it so when the main character gains a level the other character does too.

I've tried a few things but I cannot get it to work. Does anyone know how to do something like this?

Fr00bs

Make the character that leaves twice, and guess the starting level, or play through a couple of times until they get to that part and find the levels you need.

Tsunokiette

Add this method to Game_Actor

  def level=(n)
    @level = n
  end


Then, in the event, have the person join, and add this in the "Script" even function -

a = $game_party.members
$game_party.members[3].level = a[0].level


The first number is the number of the person who just joined.
0 being first slot, 1 being second slot, et cetera.
The second number is the number of the person who has the level you're referencing.
Same stuff as before.

I'm trying to find a way find the average level of a party, but until then this is your best bet. (I keep getting errors because the level isn't based off the integer class. I'm assuming it's a float, but meh, I'll figure it out. [/end programmer talk])

EDIT : Don't forget to heal the person.
"The wonderful thing about Tiggers
Is Tiggers are wonderful things
Their tops are made out of rubber
Their bottoms are made out of springs

They're bouncy, trouncy, flouncy, pouncy
Fun, fun, fun, fun, fun!
But the most wonderful thing about Tiggers
Is I'm the only one, I'm the only one."


Tsunokiette

I feel like an idiot. I forget like, 5 letters lol -

a = $game_party.members
a[3].level = a[0].level


Same thing as before. I forgot to add ".level" -_- my bad
"The wonderful thing about Tiggers
Is Tiggers are wonderful things
Their tops are made out of rubber
Their bottoms are made out of springs

They're bouncy, trouncy, flouncy, pouncy
Fun, fun, fun, fun, fun!
But the most wonderful thing about Tiggers
Is I'm the only one, I'm the only one."