Chaos Project

RPG Maker => RPG Maker Scripts => Script Troubleshooting => Topic started by: Helios on November 06, 2018, 02:40:47 am

Title: [Resolved] Need some help with KGC_SkillCPSystem
Post by: Helios on November 06, 2018, 02:40:47 am
Here is the script:

http://ytomy.sakura.ne.jp/tkool/rpgtech/php/tech.php?tool=XP&cat=tech_xp/skill&tech=skill_cp

My question is, is there a way to determine whether a skill is currently equipped on an actor or not?
The skill conditional branch will always return true if the skill is learnt, reguardless if equipped in the CP system or not.
Title: Re: [RMXP] Need some help with KGC_SkillCPSystem
Post by: KK20 on November 06, 2018, 03:04:15 am
Maybe use the script call:
$game_actors[ACTOR_ID].battle_skills.include?(SKILL_ID)

replacing ACTOR_ID and SKILL_ID obviously.
Title: Re: [RMXP] Need some help with KGC_SkillCPSystem
Post by: Helios on November 06, 2018, 04:55:05 am
Thanks! It worked. Strange, I actually tried that before posting here. Undefined method for battle_skills if I recall correctly.

Just to clarify, is the first actor 0 or 1 in RMXP? I remember something like the first actor should actually be 0 instead of 1. Maybe that was something else.
Title: Re: [Resolved] Need some help with KGC_SkillCPSystem
Post by: Blizzard on November 06, 2018, 10:30:02 am
It's 1. 0 is always nil so it's used internally to indicate "unassigned" or "nonexistent".