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
44,789
Reaction score
15,919
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
6,013
Reaction score
2,351
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
5,001
Reaction score
3,177
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
5,001
Reaction score
3,177
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

I know I'll put one of my game's sprites here to give the illusion that I am a productive member of game society.
handelspriteanim.gif
Preparing untested English localization for DOWNFALLEN.

unknown-43.png
Sometimes I wonder if I feature creep... 225 magic spells is a lot lol.

Forum statistics

Threads
124,500
Messages
1,164,060
Members
163,329
Latest member
milkpowder
Top