So, I was just looking around, trying to put together how to get the battle system working. Then, I noticed something, in the LeTBS plugin, it says animation 124 is played when enemies or actors are placed. Went to setting, upped the max animations from 122 to 200, tested it and my game worked. I don't understand but it works.
Also, I agree with Sissel Cabanela, you sir, are smart. Would love to learn a thing or two from you.
This is because it was an "Out of range" error.
If MAX = 122 (like you originally had) and it's looking for 124, then you'll have issues.
You're one smart dude, I must say. I'm curious though, while Actor/Enemy differentiation makes sense, is there not a way to make it so that it's 'Opposite Team'? What I mean by that is if used by an Actor, it will only check enemies, whereas if used by an Enemy, it would only check Actors. Likewise, is 'Same Team' not something available? I'm curious about that, as I believe I've seen such used in Yanfly's targeting systems, but I don't know if that's available with the default engine.
If you look at the base for type === "allies"
it actually says this:
It uses lecodes system to determine if e is an ally of user, so this is what you want.
Using scope_select; allies will work for both enemy and actor teams.
To make this only affect certain states, CLONE this. and you need to update the pattern matching
I'm going to use our new custom AstateId as a base (for pattern)
if (type.match(/AllystateId\((.+)\)/i)) {
AstateId= Number(RegExp.$1);
condition = function (e) {
return e && LeUtilities.isAlly(user.battler(), e.battler()) && e.battler().isStateAffected(AstateId); ;
};
}
in theory this should then say
if e(is not null) AND e is an ally of the current user, AND e is affected by this state, return true, else return false
In the below, i'm using the enemy version of the above:
scope_select: EnemystateId(220)
which uses the condition:
return e && LeUtilities.isEnemy(user.battler(), e.battler()) && e.battler().isStateAffected(EstateId);
Now it is worth noting that we should add a neutral check for the stateID
Which would be:
if (type.match(/StateId\((.+)\)/i)) {
StateId= Number(RegExp.$1);
condition = function (e) {
return e && e.battler().isStateAffected(StateId);
};
}
Which here, it states, as long as e is an entity and e is affected by StateId, then it is a valid target.
It is also worth noting that you may be able to use
scope_select: eval(Put your evaluation in here)
it is listed as a valid match, but I do not know how "finished" it is.
For proof anyway, I have both yume and the enemy inflicted with "Second Wind"
and I set my heal skill to: scope_select; StateId(220)
And now, you see that both dudes can be targeted.