RPG Maker MV

RPG Maker MV

semmiesem9 Feb 10, 2019 @ 6:20am
Skills affecting targets with certain State.
I am quite new to RPG Maker, so this may be pretty easy.

Let's say I have a fully working Sleep Powder skill that can afflict enemies with a Sleep State.
I now have a second skill, Sleep Kill, that can instantly kill enemies by affecting them with the Knockout State.

How do I make it so that Sleep Kill can only be used on Sleeping enemies, or rather, only have an effect on them?
Originally posted by Caethyril:
One option could be to use this formula for Sleep Kill:
if (b.isStateAffected(10)) b.addState(1); 0
This will add state #1 (Knockout) to the target if they are currently affected by state #10. The semi-colon marks the end of the "if", and the zero at the end is used for the skill's damage. Change the 10 as needed to match the ID of your sleep state. =)

Alternatively Yanfly has a Selection Control plugin[yanfly.moe] (it requires two other plugins by Yanfly: Target Core and Battle Engine Core). Amongst other things, this plugin provides a <Select Conditions> notetag block...you can make the skill only able to target sleeping battlers by putting this in the skill's notebox:
<Select Conditions> State: 10 </Select Conditions>
Again, change the 10 to match your sleep state ID. Then you can simply add an Add State: Knockout effect to Sleep Kill. ^_^
< >
Showing 1-3 of 3 comments
The author of this thread has indicated that this post answers the original topic.
Caethyril Feb 10, 2019 @ 7:32am 
One option could be to use this formula for Sleep Kill:
if (b.isStateAffected(10)) b.addState(1); 0
This will add state #1 (Knockout) to the target if they are currently affected by state #10. The semi-colon marks the end of the "if", and the zero at the end is used for the skill's damage. Change the 10 as needed to match the ID of your sleep state. =)

Alternatively Yanfly has a Selection Control plugin[yanfly.moe] (it requires two other plugins by Yanfly: Target Core and Battle Engine Core). Amongst other things, this plugin provides a <Select Conditions> notetag block...you can make the skill only able to target sleeping battlers by putting this in the skill's notebox:
<Select Conditions> State: 10 </Select Conditions>
Again, change the 10 to match your sleep state ID. Then you can simply add an Add State: Knockout effect to Sleep Kill. ^_^
Last edited by Caethyril; Feb 10, 2019 @ 7:32am
semmiesem9 Feb 10, 2019 @ 8:28am 
Ah, thank you, Caethyril! This will be sure to help.
JohnDoeNews Feb 11, 2019 @ 6:06am 
Originally posted by semmiesem9:
I am quite new to RPG Maker, so this may be pretty easy.

Actually this is not quite easy after all. :p This is something most experienced users would still have a struggle with. Well, if they didn't see the formula Cath just gave that is. :p I did not test the formula yet, but before I saw it, I wouldn't have ad any idea how to do it, and I would have come up with conditional branches and stuff.
< >
Showing 1-3 of 3 comments
Per page: 1530 50

Date Posted: Feb 10, 2019 @ 6:20am
Posts: 3