Hello to everyone!
I wanted if is possible to make the following things:
Check for an event that trigger IF someone in the party has a particular skill.
I cannot know WHO (actor) and WHEN (level) the skill will be get.
The vanilla rpg maker make me check for ITEM and ACTOR, but not for SKILL.
Some help? (Obviusly any plugin info will be good).
Thank you in advance.
How will the skill be acquired?
If you have an event somewhere in your game that the player can find at any time, with any character, then you can create a variable or a switch that increments/toggles when the player activates the event that teaches them the skill.
Then you could have a conditional branch that checks to see if a variable is 0 or 1, or if a switch is on or off depending on whether or not the player has learned a skill.
That way it doesn't matter what actor learns the skill or when it's learned, because you're not checking IF an actor has the skill, you're just changing a variable or switch when a player triggers the event to learn the skill and then checking that value.
Well, I'm using a Job System (Yanfly Plugin), so I don't know how to set the switch to on...
I was already thinking about using a switch, but with this little problem, i was searching for a different approach.
The skill is buyed when the character want, but after that, is ALWAYS in use.
I'm not sure how the Job System plugin works, so I won't really be able to help much with that, but if the skill is purchased you can have an event on the way out of the shop(or location of the merchant) that as you pass over it on your way out it checks to see if any actors in your party have the skill learned.
You might need to use a script to do it that iterates through all of your actors in the party and checks their skills to see if they have a particular skill learned.
EDIT: FIXED THIS SCRIPT
X = skill index
N = variable index
Y = variable value
for (i = 1; i < $gameParty.allMembers().length; i++){ if ($gameActors.actor(i).isLearnedSkill(X)) { $gameVariables.setValue(N, Y); }}So I fixed that block of code I wrote earlier this morning, I'm not sure if you saw it but if you did then it was completely wrong and made me look like a fool. I was kind of ballparking it anyway because I didn't have access to the editor.
This script (that I have tested now) will iterate through your whole party and check if an actor has learned the specific skill. If they have, it will set a variable to a value. You can then just check that variable every time you want to use the skill in your game, if it's 0 you haven't learned the skill and can't utilize the event, if 1 then you have the skill and can use the event.