Getting hit by attacking an enemy (standard battle system)

Klunky2

Veteran
Veteran
Joined
Jul 2, 2017
Messages
118
Reaction score
4
First Language
german
Primarily Uses
RMMV
Hi There,
I do have a problem getting a certain type of enemy working.

I want to implement a burning foe where you get fire elemental damage if you hit him with physical damage. So... it works like a counter I guess...?
But it's important that the attacking actor gets the damage more "naturally" without any move forward animation from the enemy.
 

Arthur França

Veteran
Veteran
Joined
Nov 3, 2017
Messages
40
Reaction score
27
First Language
Portuguese
Primarily Uses
RMMV
You can use the "Buffs and States core plugin" from yanfly. There's a way to apply damage to the attacker after the hit succeed. If you put conditions like "If damage > 0 &&(and) enemy is 'your enemy' ". Take a look on his channel, it would be a lot helpful.
 

Klunky2

Veteran
Veteran
Joined
Jul 2, 2017
Messages
118
Reaction score
4
First Language
german
Primarily Uses
RMMV
Thanks for the tip.

I'm not entirely sure how that helps with my problem are you sure this is the right plug-in?
 

Arthur França

Veteran
Veteran
Joined
Nov 3, 2017
Messages
40
Reaction score
27
First Language
Portuguese
Primarily Uses
RMMV
This is a tutorial to make a Thornmail (from League of Legends). It has a similar effect as that u wanted: when the hit connects, and deal damage greater than zero, the attacker get damaged too.
 

Klunky2

Veteran
Veteran
Joined
Jul 2, 2017
Messages
118
Reaction score
4
First Language
german
Primarily Uses
RMMV
Hey thanks mate, that is exactly what I was looking for! The only thing what's left is to trigger a burning animation so that the player can see why they got recoil damage. I'm not sure if can trigger that seperately in javascript. I'm not very good at this. D:
 

Arthur França

Veteran
Veteran
Joined
Nov 3, 2017
Messages
40
Reaction score
27
First Language
Portuguese
Primarily Uses
RMMV
You can use this code to play the animation:
if the animation will play in the attacker
user.startAnimation("animation ID");

or if the animation will play in the target
target.startAnimation("animation ID");
 

Klunky2

Veteran
Veteran
Joined
Jul 2, 2017
Messages
118
Reaction score
4
First Language
german
Primarily Uses
RMMV
Wow thanks, that works perfectly! But there is still one issue that bothers me, the characters don't change their battler animation, like when they got hit. It's actually a bit confusing because it looks like the attack wouldn't hurt them but that shouldn't the case. I need some way to play the "got hit animation" seperately. I looked for javascript command but coulnd't find anything, sorry if I bother you again. DD:
 

Klunky2

Veteran
Veteran
Joined
Jul 2, 2017
Messages
118
Reaction score
4
First Language
german
Primarily Uses
RMMV
But there is still one issue that bothers me, the characters don't change their battler animation, like when they got hit. It's actually a bit confusing because it looks like the attack wouldn't hurt them but that shouldn't the case. I need some way to play the "got hit animation" seperately
I know it's been a while, but the problem still exists :|
 

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,860
Messages
1,017,040
Members
137,569
Latest member
Shtelsky
Top