Original Source
- Original title: Yanfly Skill Core | Adding Variable on Skill Use Depending on Weapon
- Original author: fallenlorelei
- Original date: November 18, 2016
- Source thread: https://forums.rpgmakerweb.com/threads/yanfly-skill-core-adding-variable-on-skill-use-depending-on-weapon.71176/
- Source forum path: Game Development Engines > RPG Maker Javascript Plugins > Javascript/Plugin Support
Summary
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. { "lightbox_close": "Close",
Archived First Post
I tried using a simple common event that was called on every time they used "Attack." This didn't do anything.
Protected download
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?
Downloads / Referenced Files
Log in, then follow the RPG Maker Developers Group to see these download links.
Log in to downloadReferenced Images / Attachments
Creator Claims / Removal
If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.
Replies (0)
No replies yet.
Topic Summary
Loading summary...
