SumRndomDude Timed Attack Formula Question

Leon Kennedy

Restaff Novice
Restaff
Joined
Aug 14, 2016
Messages
613
Reaction score
470
First Language
english
Primarily Uses
RMMV
Plugin link: 





trying to use the timed attack function tas power from sumrandomdude along with my own custom formula 


With (a.atk * 4 - b.def * 2) * ($gameTemp.tas_power) or any very basic formula like this it works


however if we go into more complex formulas such as the one i realllllly want to work with this, it doesnt work no matter how i incorporate it


if (a.hpRate() <= 0.35) { a.setHp(a.mhp); a.atk*4-b.def*2 + 200; } else { a.atk*4 - b.def*2; }


So basically the mini game will pop up but either ill deal 0 damage or it will only use my first formula and the whole idea of trying to hit the center for more damage is gone.  Any suggestions on how to make this work? I'm sure others that have their own custom formulas will want to know this as well. 
 
Last edited by a moderator:

Leon Kennedy

Restaff Novice
Restaff
Joined
Aug 14, 2016
Messages
613
Reaction score
470
First Language
english
Primarily Uses
RMMV
Figured it out :)  needed to minus and add in a few things heres the formula btw in case anyone wants to use it will calculate the timed attk as well as adding 200 damage to your attack if health is under 35% 


if (a.hpRate() <= 0.35) { a.setHp(a.mhp); a.atk*4-b.def*2 + 200; } else { (a.atk*4 - b.def*2) * ($gameTemp.tas_power)}
 

Leon Kennedy

Restaff Novice
Restaff
Joined
Aug 14, 2016
Messages
613
Reaction score
470
First Language
english
Primarily Uses
RMMV
Scratch what I said above, everything about the formula does work however it gives an unexpected feature once the battle is forced into the double damage mode. It complete regenerates their hp after one double damage shot. Any ideas on how to fix this?
 

SumRndmDde

Follower of RNGesus
Veteran
Joined
Jul 30, 2013
Messages
225
Reaction score
423
First Language
English
Primarily Uses
RMMV
Scratch what I said above, everything about the formula does work however it gives an unexpected feature once the battle is forced into the double damage mode. It complete regenerates their hp after one double damage shot. Any ideas on how to fix this?


Could you explain in more detail what you are trying to accomplish?
 

Leon Kennedy

Restaff Novice
Restaff
Joined
Aug 14, 2016
Messages
613
Reaction score
470
First Language
english
Primarily Uses
RMMV
Thanks again for the reply man and sorry if this is kinda hard to understand what I'm asking ill try to explain.


Damage Formula should = normal damage with your timed attk variable as long as actors hp is over 35% hp, when below 35% hp the actor should deal + 200 damage along with your timed attk variable as well. The formula I put above does all that but also unexpectedly regenerates all hp after the actor attacks once but only when they are under 35% hp curiously. So I am just trying to figure out if the problem is on my end or maybe if the  ($gameTemp.tas_power) will not work with another damage variable such as this one?
 
Last edited by a moderator:

SumRndmDde

Follower of RNGesus
Veteran
Joined
Jul 30, 2013
Messages
225
Reaction score
423
First Language
English
Primarily Uses
RMMV
Um...well the damage formula you have presented is this:


if (a.hpRate() <= 0.35) { a.setHp(a.mhp); a.atk*4-b.def*2 + 200; } else { (a.atk*4 - b.def*2) * ($gameTemp.tas_power)}




The reason the user is regaining HP is because of the part that states:


a.setHp(a.mhp);


That is setting the user's HP to their Max HP stat. I was confused since it seemed so intentionally put there, but if you wish to remove the healing effect, just delete this code from the formula. :)
 

Leon Kennedy

Restaff Novice
Restaff
Joined
Aug 14, 2016
Messages
613
Reaction score
470
First Language
english
Primarily Uses
RMMV
ah darn ok so it was my end thanks so much man xD sorry for buggin ya!
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,074
Members
137,578
Latest member
JamesLightning
Top