So I'm trying to make a skill that constricts the target to prevent them from moving. My thought process for the skill is this:
1)Actor/Enemy uses the ensaring skill on a target on opposing team.
2)Target becomes 'Constricted'. In this state, they are unable to attack, guard or use skills or items.
3)User becomes 'Constricting'. In this state, similar to the constricted, they cannot attack, guard, or use skills or items.
4)Each turn, both the Constricted and Constricting can choose one of two actions
4a)The Constricted can either 'Struggle' in an attempt to break free, or 'Wait' and do nothing.
4b)The Constricting can either 'Constrict' to deal damage to the Constricted, or Release them.
5)Upon either a successful Struggle or a Release, both the user and the target are free to use actions as normal.
I have the states working as intended, but my issue is the targeting for the 'Constrict' skill. I'm attempting to use Visustella Battle Core's JS Targets function, but my coding knowledge doesn't help me here. With what I currently have, the skill is used, the actor animates... and nothing happens. No animation is played, no damage is dealt, nothing. What that says to me is that it's not returning any targets. Anyone mind taking a look at this and seeing what might need to be done?
For reference, the plugins I'm using for this skill are:
-Visustella Core Engine (As it's required for all the other Visustella plugins)
-Visustella Battle Core
-Visustella Skills and States Core
-Visustella Weapon Unleash (for the replacing of skills while under the states effects)
The Ensnaring skill:
The Constrict Skill:
The Constricted state (goes on the target):
The Constricting state (goes on the user):
The Action Sequence used for the Ensnaring skill:
And my current code for the Constrict skill's targeting:
To be clear: I only need help with the targeting code of the Constrict skill. The other images are mainly there in case having them will help come up with the solution.
1)Actor/Enemy uses the ensaring skill on a target on opposing team.
2)Target becomes 'Constricted'. In this state, they are unable to attack, guard or use skills or items.
3)User becomes 'Constricting'. In this state, similar to the constricted, they cannot attack, guard, or use skills or items.
4)Each turn, both the Constricted and Constricting can choose one of two actions
4a)The Constricted can either 'Struggle' in an attempt to break free, or 'Wait' and do nothing.
4b)The Constricting can either 'Constrict' to deal damage to the Constricted, or Release them.
5)Upon either a successful Struggle or a Release, both the user and the target are free to use actions as normal.
I have the states working as intended, but my issue is the targeting for the 'Constrict' skill. I'm attempting to use Visustella Battle Core's JS Targets function, but my coding knowledge doesn't help me here. With what I currently have, the skill is used, the actor animates... and nothing happens. No animation is played, no damage is dealt, nothing. What that says to me is that it's not returning any targets. Anyone mind taking a look at this and seeing what might need to be done?
For reference, the plugins I'm using for this skill are:
-Visustella Core Engine (As it's required for all the other Visustella plugins)
-Visustella Battle Core
-Visustella Skills and States Core
-Visustella Weapon Unleash (for the replacing of skills while under the states effects)
The Ensnaring skill:
The Constrict Skill:
The Constricted state (goes on the target):
The Constricting state (goes on the user):
The Action Sequence used for the Ensnaring skill:
And my current code for the Constrict skill's targeting:
Code:
<JS Targets>
//Constricting StateID
var constrictState = 95;
var currEnemy = 0;
var targetable = [];
for ( i = currEnemy; i < $gameTroop.members().length; i++ )
{
if ( $gameTroop.members()[i].isStateAffected(constrictState) )
targetable.push(i);
}
targets = targetable;
</JS Targets>
To be clear: I only need help with the targeting code of the Constrict skill. The other images are mainly there in case having them will help come up with the solution.