Hi there,
I trying to make a crafting system in my game where a variable stores the number of a skill, and then an item teaches the corresponding skill. I have the system to set the variable correctly. Then I wrote this quick script in ruby to teach the skill
$game_party.members[1].learn_skill($game_variables[0006])
But when I look at the party member, the skill doesn't show up.
Thanks in advance.
How to teach an actor a skill
● ARCHIVED · READ-ONLY
-
-
$game_variables[6]
Not
$game_variables[0006]
Also, what type is the skill? Is your actor set up to be able to use that skill type?
Why are you doing this in script, if the skill is to be learned when the item is used? Just link your item with a common event, and in the common event, use the Learn Skill command. -
I think the class can have any skills, but starts with none learned by default.$game_variables[6]
Not
$game_variables[0006]
Also, what type is the skill? Is your actor set up to be able to use that skill type?
Why are you doing this in script, if the skill is to be learned when the item is used? Just link your item with a common event, and in the common event, use the Learn Skill command.
I'm doing it this way because I have another system where the player picks the number of the skill (without knowing it) then it gets added. The item is almost irrelevent, it's just there for narrative purposes.
I can't use the learn skill command because you have to pre-set the skill, I want it to be dynamic. I don't want to make 50 odd items to correspond to each skill.
Edit: also I don't think 0006 vs 6 should make a difference. I just tried it anyways and it didn't help. -
A class cant learn ANY skill, they can only learn them from the skill type you define. Since RPG maker VX Ace lets you define your own skill types you have to be careful of this. If you have the Skill types of "Magic", "Weapon Specials", and "Ninja Jutsu" but a class is only defined as having "Ninja Jutsu" even if you try to teach them Magic or Weapon specials they can't learn skills from those types.
-
I figured out what was going on. I was actually teaching a skill that doesn't show up in the list *smacks forehead*.
Anyways thanks so much for your help. -
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.