SKILL LEARNING QUESTION

Posts

Pages: 1
I'm trying to make a thing where the player learns skills by getting books(like tomes and such).

But the problem is that I want the player to be a certain level to learn it.

Example: you buy a book to learn a skill but you need to be lvl 5 or higher to learn it.

Any help would be appreciated ^_^
This is simple to do simply, but quickly scales in difficulty the more you want to add to it.

If you just want it to be for one character, open up a common event (you'll need one for every skill) and set a variable to that character's level.
then, start a fork, with an else handler, for if that variable is greater than or equal to, say, 5. If it is equal, add the skill, then display a message saying you learned the skill. If it's not, then display a message that you're not high enough level.

In rm2k3 (I don't have rmvx available at the moment, but it'd be mostly the same in every other version) it'll look something like this:
<>Variable Oper: [0100:charlvl] Set, Squ Level
<>Branch if Var [0100:charlvl] is 5 or more
<>Change Skills: Squ Zap Add
<>Message: Squ learned Zap!
<>
: Else Handler
<>Message: Squ is not high enough level to learn this skill.
<>
: End
<>

This gets a lot more complicated the more you add to it. If you want a skill to be available to all the heroes, then you'll need to add three more variables for each party member, and a choice that checks each variable and gives the skill to the correct hero.
thanks ^_^ It worked!

But then I reached yet another problem and I should have seen this coming. But would I have to do something completely different if I wanted it to be like; only certain classes can learn this skill and you need to be lvl 5 or higher to learn.
author=bored-dood link=topic=3944.msg79623#msg79623 date=1244692619
thanks ^_^ It worked!

But then I reached yet another problem and I should have seen this coming. But would I have to do something completely different if I wanted it to be like; only certain classes can learn this skill and you need to be lvl 5 or higher to learn.

You'd need a switch for every character being each different class you have, and if a character is a certain class and a certain level, allow them to learn the skill.

So something like..

If Switch(SteveisaWarlock): ON
If SteveLevel = 5
LearnSkill *skill*
Else
Message "Unable to learn skill"

Note: Maybe this is easier to pull off in RmXP by using some script or something, but that's how I'd do it in RM2K.
Craze
why would i heal when i could equip a morningstar
15170
author=Alexei403 link=topic=3944.msg79677#msg79677 date=1244720655
If Switch(SteveisaWarlock): ON
If SteveLevel = 5
LearnSkill *skill*
Else
Message "Unable to learn skill"

Note: Maybe this is easier to pull off in RmXP by using some script or something, but that's how I'd do it in RM2K.

Better: Use a variable for each character's class. 1 is Warlock, 2 is Warlord, 3 is Rogue, 4 is Paladin, etc.
author=Fallen-Griever link=topic=3944.msg79695#msg79695 date=1244725978
I think there is a conditional branch in RM2K3 that just allows you to say:

If Hero Class = X Then
<SKILL LEARNING CODE HERE>
Else
Message: "Hero is not the correct class."
End Case
There is?? Maybe I have a different RM2k3 than you.
Craze
why would i heal when i could equip a morningstar
15170
F-G, you speak lies!
Pages: 1