- Joined
- Mar 13, 2016
- Messages
- 2
- Reaction score
- 0
- First Language
- English
- Primarily Uses
Hey, everybody, I'm new here. I've just decided to dive into MV and needed some help with a particular problem I'm having.
My basic goal is to be able to dynamically check if a specific actor has a specific skill learned. Basically, I need to be able to set a variable, and then check if the actor who's index corresponds with that variable has learned a specific skill. So if I wanted to check if Actor 4 has Skill X, I could set the variable to 4. If the Actor in question has learned the skill, I would turn a specific switch on.
After doing my own research into this, I learned a few things. I know that it is possible to achieve the results I want using some long form eventing. I COULD create an individual conditional branch checking every actor for the skill I have in question. The problem is, I have a lot of skills that need checking, and more importantly, I have a LOT of actors that will need checking. To create conditional branches for every possible occasion would take forever. Don't get me wrong, I'm totally willing to do it the long way if necessary, but I wanted to see if this was possible using scripting first.
Second, I think the following script call has something to do with what I'm trying to accomplish:
$game_actors[X].skills.include?($data_skills[Y])
However, I'm not entirely sure how to properly use this. Could I put this into the script option of the Conditional Branch action to create a custom condition? If so, could I possibly replace the actor index [X], with a variable? I could totally be barking up the wrong tree here, since my knowledge of such things is limited.
If I'm being dumb, feel free to set me straight. Otherwise, thank you to anyone who is willing to help.
My basic goal is to be able to dynamically check if a specific actor has a specific skill learned. Basically, I need to be able to set a variable, and then check if the actor who's index corresponds with that variable has learned a specific skill. So if I wanted to check if Actor 4 has Skill X, I could set the variable to 4. If the Actor in question has learned the skill, I would turn a specific switch on.
After doing my own research into this, I learned a few things. I know that it is possible to achieve the results I want using some long form eventing. I COULD create an individual conditional branch checking every actor for the skill I have in question. The problem is, I have a lot of skills that need checking, and more importantly, I have a LOT of actors that will need checking. To create conditional branches for every possible occasion would take forever. Don't get me wrong, I'm totally willing to do it the long way if necessary, but I wanted to see if this was possible using scripting first.
Second, I think the following script call has something to do with what I'm trying to accomplish:
$game_actors[X].skills.include?($data_skills[Y])
However, I'm not entirely sure how to properly use this. Could I put this into the script option of the Conditional Branch action to create a custom condition? If so, could I possibly replace the actor index [X], with a variable? I could totally be barking up the wrong tree here, since my knowledge of such things is limited.
If I'm being dumb, feel free to set me straight. Otherwise, thank you to anyone who is willing to help.

