Raise a variable when you hit a target for Weakness?

Peva

Don't overwhelm yourself. Set small goals.
Veteran
Joined
Dec 5, 2012
Messages
199
Reaction score
18
First Language
Russian
Primarily Uses
RMMV
So strange question, one that I'm not sure is possible without a plugin. I want a variable to go up when the player hits a target for weakness. By weakness, I mean hitting a target with an element at or above 101% as defined in the enemy's traits window.

1579746930196.png
When the player uses a skill or attack that hits for fire on this particular enemy, I want to increase a variable of my choice by 1. The variable isn't specific to fire or this enemy, just any time an enemy has it's weakness exploited.

Is this doable through events or will this need a plugin? If it is doable but only through a battle event that processes whenver it's hit via a troop event, I don't think that will be viable, but please let me know how to do it anyway.
 
Last edited:

Silva

Scoobityboo
Veteran
Joined
Nov 5, 2018
Messages
392
Reaction score
210
First Language
English
Primarily Uses
RMMV
You can do this in the damage formula by using something like this:

Code:
if (b.elementRate(this.item().damage.elementId) > 1) {v[variableId]++}; damageFormula;
replace variableId with the id of the variable you want to increase. Also make sure the variable has a numeric value or this will not work. Replace damageFormula with the skills normal damage formula.

If you want this to happen on all skills I would advise a plugin rather than trying to use the damage formula or an event, just for simplicity's sake.
 

Peva

Don't overwhelm yourself. Set small goals.
Veteran
Joined
Dec 5, 2012
Messages
199
Reaction score
18
First Language
Russian
Primarily Uses
RMMV
Yes, I understand. Thank you!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Stress testing my latest version of the game with my new madness engine. :LZSexcite:

Hello, where can I find the list of all watched threads? I've been using the Watch function to save the Threads I want to keep but I don't find the list anywhere....

New card design, thanks to all my free time quarantined. (Hope that's not too big of an image XD )
What do you do when you're your family's resident computer 'expert'...but you are anything but a computer expert?
I wanna be the very best, like no one ever was. To make a game is my real test. To play it is my cause.

Forum statistics

Threads
95,585
Messages
930,253
Members
125,879
Latest member
CCyde
Top