- Joined
- Jul 8, 2013
- Messages
- 298
- Reaction score
- 346
- First Language
- English
- Primarily Uses
So I hope you guys can help figure this out with me. My plan is to add 1 to a variable every time a skill ("Attack") is used, depending on their weapon. If they have "this weapon," then "add 1" to "variable ID 1." If they have "this other weapon," then "add 1" to "variable ID 2." And so on. There are 4 weapons.
I tried using a simple common event that was called on every time they used "Attack." This didn't do anything.

So then I thought I'd use Yanfly's Lunatic mode. This is the script I came up with for the Attack notetag:
<Custom Execution>
if ($gameActors.actor(1).equips().contains($dataWeapons[1])
{
$gameVariables.setValue(1, $gameVariables.value(1) + 1);
}
else {
}
</Custom Execution>
This is giving me an error. SyntaxError: Unexpected token { {stack: (...), message: "Unexpected token {"}
Any ideas?
I tried using a simple common event that was called on every time they used "Attack." This didn't do anything.

So then I thought I'd use Yanfly's Lunatic mode. This is the script I came up with for the Attack notetag:
<Custom Execution>
if ($gameActors.actor(1).equips().contains($dataWeapons[1])
{
$gameVariables.setValue(1, $gameVariables.value(1) + 1);
}
else {
}
</Custom Execution>
This is giving me an error. SyntaxError: Unexpected token { {stack: (...), message: "Unexpected token {"}
Any ideas?
