Zega

game.
Member
Joined
Jun 4, 2021
Messages
4
Reaction score
2
First Language
English
Primarily Uses
RMMV
Hi, I'm using Yanfly's Buffs and States Core,
and I want to make a status effect from Team Fortress 2.

Mad Milk
Any damage done to enemies covered in milk restores 60% of the damage dealt to the attacking player's health.

The problem is that I don't know how to use the plugin's complicated JS side!

Plz help.

Thank.
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,617
Reaction score
1,997
First Language
EN
Primarily Uses
RMMZ
You could try something like this (untested):
JavaScript:
<Custom Respond Effect>
// Calculate heal amount
var heal = Math.floor(value * 0.6);
// Apply heal to attacker
attacker.gainHp(heal);
</Custom Respond Effect>
This tag should go in the "Mad Milk" state's notebox. Respond Effect should trigger after the damage is dealt. The lines starting with // are just comments to help you keep track of what's going on~
 

Zega

game.
Member
Joined
Jun 4, 2021
Messages
4
Reaction score
2
First Language
English
Primarily Uses
RMMV
You could try something like this (untested):
JavaScript:
<Custom Respond Effect>
// Calculate heal amount
var heal = Math.floor(value * 0.6);
// Apply heal to attacker
attacker.gainHp(heal);
</Custom Respond Effect>
This tag should go in the "Mad Milk" state's notebox. Respond Effect should trigger after the damage is dealt. The lines starting with // are just comments to help you keep track of what's going on~
It works perfectly!
Thank you so much!
 

Latest Threads

Latest Posts

Latest Profile Posts

Ami
need a time to not open my MV,still addicted with new vegas

i wonder what addiction effect behind playing new vegas too much,maybe INT & Science gone worse in many days :D
cdjensen94 wrote on Kaliya's profile.
Are you the one who develops Kaliya's Visual Map Enhancements. If so I desperately need some help. I bought the plugin back a few months. I've only started using it recently.
Cause MP Damage instead of HP, Localization Plugin for Translation | RPG Maker News #112

Here in Fla were are seeing crazy covid spikes and some vaccinated getting bad infections. I had a mild fever on Thurs but it went down fast. How is everyone else doing. Hopefully you are all well. :)
Wish I was better at art, specifically that I was faster at it, bc this one NPC took Several Days to complete! It's gonna take So Extremely Long to do all of the art for my game, never mind writing it... Anyways, here's my gorgon, Hopernica Sthyxis!

57b88732c7abbcd84981dacf624a98495af61fcc.gifv

Forum statistics

Threads
113,828
Messages
1,077,751
Members
147,885
Latest member
jinyuchai
Top