Hello!
I'm making a skill for my project where the user, before casting it, can choose if he wants it to target the enemies or his allies. For that i made this code, using both "YEP_Target Core" and "YEP_ActSequencePack":
So, what should this do?
1- Common Event 5 is called, and it's there where the user decides to target either enemies or allies.
The Common Event is a simple "Select Choice", and based on the choice the value of Variabile 17 will be changed to either 1 or 2;
2- The Custom Target Eval will look at Variable 17's value, and if it's 1 it will change the target to your allies, while if it's 2 it will change to the opponents;
3- The attack lands on the chosen target.
The problem is that no one receives the attack. I tried targeting both enemies and allies, but nothing.
Is there something that i'm doing wrong? Thanks in advance!
I'm making a skill for my project where the user, before casting it, can choose if he wants it to target the enemies or his allies. For that i made this code, using both "YEP_Target Core" and "YEP_ActSequencePack":
Code:
<setup action>
display action
wait: 40
clear battle log
common event: 5
</setup action>
<follow action>
</follow action>
<target action>
change variable 3 = 0
change variable 3 = Math.floor((user._level+1) / 2) + Math.randomInt(Math.floor((user._level+1) / 2) * 5 + 1)
action effect
</target action>
<whole action>
</whole action>
<finish action>
change variable 3 = 0
change variable 17 = 0
</finish action>
<Custom Target Eval>
var member = 0;
if ($gameVariables.value(17) == 1)
{
for(var i = 0; i < allies.aliveMembers().length; ++i)
{
member = allies.aliveMembers()[i];
targets.push(member);
}
}
else if ($gameVariables.value(17) == 2)
{
for(var i = 0; i < foes.aliveMembers().length; ++i)
{
member = foes.aliveMembers()[i];
targets.push(member);
}
}
</Custom Target Eval>
So, what should this do?
1- Common Event 5 is called, and it's there where the user decides to target either enemies or allies.
The Common Event is a simple "Select Choice", and based on the choice the value of Variabile 17 will be changed to either 1 or 2;
2- The Custom Target Eval will look at Variable 17's value, and if it's 1 it will change the target to your allies, while if it's 2 it will change to the opponents;
3- The attack lands on the chosen target.
The problem is that no one receives the attack. I tried targeting both enemies and allies, but nothing.
Is there something that i'm doing wrong? Thanks in advance!