Problem with self-states in damage formula

Zephyrim

Villager
Member
Joined
Dec 23, 2016
Messages
8
Reaction score
0
First Language
English
Primarily Uses
So I'm trying to make a skill which does two things

1. Deal damage to all enemies
2. Inflict a state on the caster

After searching a few threads I used "a.add_state(1);a.mhp*0.25" which is intended to deal 1/4 of the caster's max HP to all enemies and then kill the caster (similar to a self-destruct mechanism). However, the animation plays and then I get the error "require(...).Window.get(...).isDevToolsOpen is not a function"...

Does anyone have any idea what is triggering the error and/or a solution to my damage formula problem?
 

NinjaKittyProductions

Professional Murder Hobos
Veteran
Joined
Jul 9, 2013
Messages
484
Reaction score
467
First Language
English
Primarily Uses
RMMV
try using "a.setHp(0); a.mhp*0.25" instead of "a.add_state(1);"
 

Zephyrim

Villager
Member
Joined
Dec 23, 2016
Messages
8
Reaction score
0
First Language
English
Primarily Uses
try using "a.setHp(0); a.mhp*0.25" instead of "a.add_state(1);"
Yes! This works, the only problem is that after the skill is used the caster is treated as dead but the sprite remains on the field... Is there a way to force the collapse animation?

I mainly asked because there's another skill I'm working on which has the same concept but inflicts a state on the caster which weakens them for a few rounds instead of outright killing them. Is there a work-around for this?

Thanks heaps
 
Last edited:

Aesica

undefined
Veteran
Joined
May 12, 2018
Messages
1,523
Reaction score
1,415
First Language
English
Primarily Uses
RMMV
Just for future reference, it's a.addState(n); not a.add_state(n);

That said, yeah a.setHp(0); should be fine in this case, but if you want to add other states, add_state isn't a proper function.
 

Zephyrim

Villager
Member
Joined
Dec 23, 2016
Messages
8
Reaction score
0
First Language
English
Primarily Uses
Just for future reference, it's a.addState(n); not a.add_state(n);

That said, yeah a.setHp(0); should be fine in this case, but if you want to add other states, add_state isn't a proper function.
Perfect! Thanks heaps :)

Try using "a.setHp(0); a.performCollapse(); a.mhp*0.25"
Tested it. It should work.
Awesome, that all works fine thanks!
 

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

Latest Threads

Latest Posts

Latest Profile Posts

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
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,575
Latest member
akekaphol101
Top