Preserved forum archive. This topic stores the original first post and locally mirrored RPG Maker Web attachments when available. It is posted by the BMMPlay archive account, not by the original creator.
Original Source
Original title: Adding to a variable through script call
Source forum path: Game Development Engines > RPG Maker Javascript Plugins > Javascript/Plugin Support
Summary
Is it possible to add or subtract from a variable through script calling? I am using Yanfly's Buff and States Core plugin to try and count how many characters in a battle have the state isDead. I found the script call $gameVariables.setValue(var, value); but it only seems to set the vaariable to a specific number or another variable which if I use another variable then I end up in an infinite loop causing my game to freeze. { "lightbox_close": "Close", "lightbox_next": "Next",
Archived First Post
Is it possible to add or subtract from a variable through script calling? I am using Yanfly's Buff and States Core plugin to try and count how many characters in a battle have the state isDead. I found the script call $gameVariables.setValue(var, value); but it only seems to set the vaariable to a specific number or another variable which if I use another variable then I end up in an infinite loop causing my game to freeze.
Long story short is there a way to add to a variable through script call instead of just setting it?
RPG Maker Web attachments are mirrored locally when available. Other external links remain hosted by their original creator or third-party service.
Local mirror:17316-ea496256a3b1da34bbd85037424445ff.png SHA-256: 8bd8bc0b5b8cd85505230f9a1daaa5ea1046c7b5f8e53a72c41921fb75d02d7b Original attachment URL: https://forums.rpgmakerweb.com/attachments/problem-2-png.30065/
Referenced Images / Attachments
problem 2.png
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.