How to teach an actor a skill

Status
Not open for further replies.

tuluse

Warper
Member
Joined
Jun 5, 2014
Messages
3
Reaction score
0
First Language
English
Primarily Uses
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.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
$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.
 

tuluse

Warper
Member
Joined
Jun 5, 2014
Messages
3
Reaction score
0
First Language
English
Primarily Uses
$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.

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.
 
Last edited by a moderator:

RyokuHasu

Developer
Veteran
Joined
Jun 23, 2012
Messages
274
Reaction score
37
First Language
English
Primarily Uses
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.
 
Last edited by a moderator:

tuluse

Warper
Member
Joined
Jun 5, 2014
Messages
3
Reaction score
0
First Language
English
Primarily Uses
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.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
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.
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,864
Messages
1,017,056
Members
137,573
Latest member
nikisknight
Top