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,740
Reaction score
15,877
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
5,709
Reaction score
2,255
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
4,524
Reaction score
2,884
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
4,524
Reaction score
2,884
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

Watch Studio Blue play Numina by starlit in our latest RPG Maker Games Critique stream starting NOW!

Wish me luck. One of the leading experts on certain false shuffle is going to check if my skill is good enough to be called "not total trash".
Not an RPG Maker Update but I'm happy to say that I finally passed my drivers written test. Which makes me a happy guy.
FWRu-cYXkAAAUbl
Have you ever been in such a luck streak you felt fear something was wrong?
I'm going to be adding in combat animations, revamping the UI and putting in a new cutscene this week, so this is your last chance to play the MC:RIS demo in its original form! Say you were there since the beginning! https://qos.itch.io/infinite-sadness

Forum statistics

Threads
123,125
Messages
1,154,157
Members
161,458
Latest member
c100note
Top