Forgetting Skills

Status
Not open for further replies.

FoppyOmega

Creator of Forever Home
Member
Joined
Jan 19, 2014
Messages
20
Reaction score
9
First Language
English
Primarily Uses
RMVXA
The script call for forgetting a skill doesn't work for me if the skill is in the actor's Features list:

$game_actors[1].forget_skill(id)This only works on skills that the actor was not initialized with. Is this a known bug or an incompatibility with one of my scripts?
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
You don't have to use a script call for having an Actor forget a skill. In an event, there is already a section for having someone either learn or forget a skill.

On the first page in the ACTOR section there is an option for Change Skills. There, you can pick the actor and either Learn/Forget.

Or if you need it to be done as a script, then...you can just ignore me :p I don't know much about scripting...
 

FoppyOmega

Creator of Forever Home
Member
Joined
Jan 19, 2014
Messages
20
Reaction score
9
First Language
English
Primarily Uses
RMVXA
I need to do it through scripting, but I've got a couple alternative methods. I was more or less just curious if it's a known quirk of the program.
 

ShadowLurk

Tanoshii~
Veteran
Joined
Feb 14, 2014
Messages
226
Reaction score
53
Primarily Uses
Actually, skills from features are not added to learned skills. So you cannot delete that skill using forget_skill.

From Game_Actor

def skills (@skills | added_skills).sort.collect {|id| $data_skills[id] } endand from Game_BattlerBase

Code:
  def added_skills    features_set(FEATURE_SKILL_ADD)  end
 
Last edited by a moderator:

FoppyOmega

Creator of Forever Home
Member
Joined
Jan 19, 2014
Messages
20
Reaction score
9
First Language
English
Primarily Uses
RMVXA
Ah, interesting. So I should have my forget skill method run through the features array as well. Thanks!

This can be closed.
 

ShadowLurk

Tanoshii~
Veteran
Joined
Feb 14, 2014
Messages
226
Reaction score
53
Primarily Uses
Ah, interesting. So I should have my forget skill method run through the features array as well. Thanks!
The fact is that features_set generates a fresh array every time it is called, so erasing an entry from it is futile.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I made a script that allows you to do exactly that :) Look for Dynamic Features in the RGSS3 Scripts forum.


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 Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
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.

Forum statistics

Threads
105,868
Messages
1,017,081
Members
137,582
Latest member
Spartacraft
Top