Toxsick

Veteran
Veteran
Joined
Sep 21, 2019
Messages
32
Reaction score
4
First Language
English
Primarily Uses
RMMV
Hey guys I'm currently trying to create a Magic Jammer effect in the buffs and states core I have the pre created one yanfly made but im struggling trying to change it to my needs. I have it set to block a percentage of the main characters health but it keeps giving me a bunch of decimal numbers for health. So when I heal I get numbers like 255.5655345 I'd like to round those numbers any way to do that?
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
45,506
Reaction score
16,405
First Language
English
Primarily Uses
RMMV

I've moved this thread to Plugin Support. Thank you.



What is a "magic jammer" effect?
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
7,228
Reaction score
2,856
First Language
Dutch
Primarily Uses
RMMV
roud numbers is done with math.ceil(...) for up or down)
and there where was another one (1 for up, 1 for down), 1 is given,
forgot the other one.

depending what you have in the notetag of the state.
if you show that, advance lunatic coders can help you correct
the issue for you.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
7,628
Reaction score
5,393
First Language
English
Primarily Uses
RMMV
Put your formula (with the division to create the percentage) inside of Math.floor(here)
 

Toxsick

Veteran
Veteran
Joined
Sep 21, 2019
Messages
32
Reaction score
4
First Language
English
Primarily Uses
RMMV
[move]Plugin Support[/move]

What is a "magic jammer" effect?
It basicly creates a barrier that nullifies incoming heals for a certain amount.
 

Toxsick

Veteran
Veteran
Joined
Sep 21, 2019
Messages
32
Reaction score
4
First Language
English
Primarily Uses
RMMV
Put your formula (with the division to create the percentage) inside of Math.floor(here)
Hi sorry I have had to work a lot and havn't had much time to test this out. I tried it and it doesn't seem to be working. I'll send the line of code that the formula is placed in and maybe you could help? Thank you so much. There's two lines. One for generating the number to block and another to show it on the counter so the player can see how much they have to heal.

target._antiHealBarrier = target.mhp / 3;


target.setStateCounter(stateId, target.hmp / 3);
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
7,628
Reaction score
5,393
First Language
English
Primarily Uses
RMMV
What did you try that didn't work?
 

Toxsick

Veteran
Veteran
Joined
Sep 21, 2019
Messages
32
Reaction score
4
First Language
English
Primarily Uses
RMMV
What did you try that didn't work?
I played with it for a little and it worked. I had the Math.floor in the wrong place on the second line I gave. I put it inside the quotations instead of outside of the entire thing. But it's working perfectly now! Thank you for your help!
 

Latest Threads

Latest Profile Posts

FsFvJLfWYAEN1Th


The thing that stinks about parallax mapping is the time investment it takes to make one map, but it does help sell the art style of my game so... In for a penny, I guess.
chapter one of the demo is almost done i just need my protag's va to get me his lines
Who else is excited for RPG Maker Unite? I can't wait to get my hands on it.
Every time...I forget about this stupid pun every time, and every time I see it, I both love and hate my sense of 'humour'. If you can call it that.
Untitled.png

Forum statistics

Threads
129,839
Messages
1,205,624
Members
170,982
Latest member
sleepy_pixel
Top