Secret Door and Trap Finding by Skill

nerochepiace

Veteran
Veteran
Joined
Dec 1, 2015
Messages
48
Reaction score
2
First Language
italian
Primarily Uses
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.
 

Kojinus

Villager
Member
Joined
Nov 26, 2015
Messages
9
Reaction score
1
First Language
English
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. 
 
Last edited by a moderator:

nerochepiace

Veteran
Veteran
Joined
Dec 1, 2015
Messages
48
Reaction score
2
First Language
italian
Primarily Uses
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.
 

Kojinus

Villager
Member
Joined
Nov 26, 2015
Messages
9
Reaction score
1
First Language
English
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.
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

Latest Profile Posts

On my journey of character rework: I had this character, she was meant to be just a princess that joins your party. And at long term she was just uninteresting... So I tweaked her to be a rebel agaisn't the royalty before meeting up with the party.

Quick tip for any other ametuer pixel artists! When trying to create a colour palette, enabling Antialiasing can speed up the process of creating different shades! Just place your lightest colour and your darkest colour next to each other, select both pixels, and stretch it out!
Revolutionizing the JRPG Industry: Knocking on Doors.

Take that, murderhobos.
Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.

Forum statistics

Threads
106,054
Messages
1,018,580
Members
137,843
Latest member
Betwixt000
Top