So my idea here is fairly straightforward, I've done my best to browse through the help files of all chrono engines various plugins to find an attack note tag or a command I could use but I haven't found anything. Essentially I just want to raise a designated variable by a particular amount when an attack is used but only if it makes contact with an enemy
MV Chrono engine raise variable upon attack contact?
Javascript/Plugin SupportYou use Yanfly Buffs and States core and the patch for it in my Chrono Engine Advanced guide
Most Buff and State Core scripts will work fine in Chrono Engine
forums.rpgmakerweb.com
Relevant
forums.rpgmakerweb.com
If this effect is tied to the weapon you could also use the chain action hit comment to make the user use a blank follow up tool that increases a variable instead of Buffs and States core. It's just two ways to do it
Most Buff and State Core scripts will work fine in Chrono Engine
MV - MV + MZ Make an Action Game! Chrono Engine Advanced Features and Scripts (gamepad, status effects, fighting followers)!
Following up from my Chrono Engine beginner guide, I bring you an advanced features guide! I have a lot of Chrono Engine scripts I've written over the past year so I will be organizing them here, and regularly adding new ones. Feel free to share your own! How to add controller support to...
forums.rpgmakerweb.com
Relevant
MZ - Increase Variable when Certain Target is hit
I trying to create thresholds so when a boss is hit by an actor's Action Sequence Common Event attack, that common event increases this threshold by X amount depending on the power of that attack. How can I make it so the game check if the attack lands on the boss ? Like, if the attack damages...
forums.rpgmakerweb.com
If this effect is tied to the weapon you could also use the chain action hit comment to make the user use a blank follow up tool that increases a variable instead of Buffs and States core. It's just two ways to do it
Disregard, figured it out.
Ok... so I have a state applied to my attack that lasts for 1 turn and using Yanfly's buffs and state core along with your patch I have the notetag:
<Custom Apply Effect>
$gameVariables.setValue(42, $gameVariables.value(42) + 1);
</Custom Apply Effect>
on the state I mentioned. Game boots up and runs fine until I strike with the attack in question, then I get the error "Cannot read property 'textColor' of undefined".
Could you press F8 or F12 when that error pops up and get the console log? I think it's from MOG_DmgPopUpEffects but not sure.
I have no idea what I'm looking for here or how to read this so I'll just send a screenshot
Oh, it's coming from the Show Turns parameter in Buffs and States core. I'll have to look into it. Turn it off and it'll work
Awesome, works perfectly now!
Here's a question for you though, The killing blow on any enemy doesn't seem to count. The variable increases on all hits fine until the enemy gets knocked out
Hmm, is that also an issue in the regular battle scene or is it Chrono Engine specific?
Ive only tried it using the chrono engine battle system
I'm wondering if maybe the state just isn't counting because its registering the enemy as dead before it can be applied?
Well, I asked because it would narrow down where to look to fix it.
It was because the knockout state was registering before the variable state. I fixed it by setting my attack to run a switch that starts a parallel common event that waits for a portion of a frame before turning itself off and then using chrono engine and setting a switch to go off when the enemy dies I run another parallel event in the background that checks if the attack switch is on and adds one to the variable if it is.
Original thread: https://forums.rpgmakerweb.com/threads/chrono-engine-raise-variable-upon-attack-contact.177843/