- Joined
- Mar 23, 2016
- Messages
- 159
- Reaction score
- 12
- First Language
- English
- Primarily Uses
So, I have this plugin, but I need to add a feature. I originally asked the author himself if he could make an edit for me, but he said he was busy and actually gave me permission to edit it myself and ask for help if needed. Here's the segment of the plugin I need to edit (It's my edited version, I don't know why I put "+ 0"):
Now, here's the thing.
What I want to do is define each actor a certain in-game variable. How this will be done is via note tags. For instance, I put <var = 22> in an actor's note tags, and it will use game variable 22 for that actor. When the plugin sets the animation index, it should check the value of the variable defined for each actor, before setting the character index. If the value of the variable is 0, or there is no variable defined for the actor, it sets the character index to the value of "vara". But if the value of the variable is something other then 0, it sets the character index to the value of "varb". The reason I put "varc" is because those should be set to either "vara" or "varb" depending on the value of the actor's defined variable.
Now, here's the thing.
What I want to do is define each actor a certain in-game variable. How this will be done is via note tags. For instance, I put <var = 22> in an actor's note tags, and it will use game variable 22 for that actor. When the plugin sets the animation index, it should check the value of the variable defined for each actor, before setting the character index. If the value of the variable is 0, or there is no variable defined for the actor, it sets the character index to the value of "vara". But if the value of the variable is something other then 0, it sets the character index to the value of "varb". The reason I put "varc" is because those should be set to either "vara" or "varb" depending on the value of the actor's defined variable.
Code:
Skurry.CA.setAnimIndex = function(ind) {
vara = ind + 0;
varb = ind + 4;
$gamePlayer._characterIndex = varc;
$gamePlayer.followers()._data.forEach(function(actor) {
actor._characterIndex = varc;
}
);
};

