- Joined
- Jan 22, 2017
- Messages
- 8
- Reaction score
- 0
- First Language
- English
- Primarily Uses
So here's the spark notes. I want an spiked enemy to hurt you if you jump on it. After digging around forums I found this
https://forums.rpgmakerweb.com/index.php?threads/how-do-i-make-a-spike-effect-in-battle.83164/
kranasAngel suggest that you use this code
I have tried this and made a custom element "Jump" and state with the notes but whatever I do the counter does not work.
I even tried a poison effect and yes I made sure to install Yanfly's buff states core, but this plugin hasn't worked for me.
I tried other things like initiating a state in the skill hp damage
a.addState(4);(a.atk * 1 - b.def * 2)
this starts a skill but then I thought about a common event
if state 4 has effected the enemy then apply state to player. how do I make it not take damage with non-spiked enemies then?
I have spent a while trying to figure this out. PLEASE HELP ME!!!
Edit:
----------Here is the solution I found. This is my step by step tutorial.----------------
I developed this if statement in the damage formula
Step 1
Put this in the skill's damage formula the actor uses
if (b.isStateAffected(16)) {a.addState(15) + a.setHp(a.hp - 1)} else {a.atk * 4 - b.def * 2}
Step 2
I created 2 states "Counter" number 15 and "Countercode" number 16
Make CounterCode have no [SV] Overlay
Step 3
I gave the enemy the (16) state I named "countercode" by using the passive state script. (put this in the enemy notes <Passive State: 16>)
YEP.13 – Auto Passive States
http://yanfly.moe/2015/10/17/yep-13-auto-passive-states/
Explanation:
Anyway, based off the if statement, If spiked enemy has this state then it does this {a.addState(15) + a.setHp(a.hp - 1)} which gives the player the "counter" state
and takes away 1hp of the actor.
else
if the enemy does not have the 16 state then attack as normal
if (b.isStateAffected(16)) {a.addState(15) + a.setHp(a.hp - 1)} else {put your own attack formula here}
tip: b.isStateAffected affects enemy, a.isStateAffected affects the actor.
In the counter state you can change the SV motion and the SV Overlay to let the player have a reaction.
This same process can be used to create poison, burn, and spiked damage on the actor.
To tweak the damage formula even more; here is a guide I found to help with HP Regeneration and whatever else customization in the damage formula you want. I hope this helps!
https://www.rpgmakercentral.com/topic/36290-damage-formulas-101-mv-edition/

https://forums.rpgmakerweb.com/index.php?threads/how-do-i-make-a-spike-effect-in-battle.83164/
kranasAngel suggest that you use this code
Code:
<Custom Respond Effect>[/B][/B][/B]
[B][B][B]var element = this.item().damage.elementId;
if (this.isDamage() && element === x) {// with x being the element ID of Jump
target.addState(y);// with y being the State ID of counter
}
</Custom Respond Effect>
I even tried a poison effect and yes I made sure to install Yanfly's buff states core, but this plugin hasn't worked for me.
I tried other things like initiating a state in the skill hp damage
a.addState(4);(a.atk * 1 - b.def * 2)
this starts a skill but then I thought about a common event
if state 4 has effected the enemy then apply state to player. how do I make it not take damage with non-spiked enemies then?
I have spent a while trying to figure this out. PLEASE HELP ME!!!
Edit:
----------Here is the solution I found. This is my step by step tutorial.----------------
I developed this if statement in the damage formula
Step 1
Put this in the skill's damage formula the actor uses
if (b.isStateAffected(16)) {a.addState(15) + a.setHp(a.hp - 1)} else {a.atk * 4 - b.def * 2}
Step 2
I created 2 states "Counter" number 15 and "Countercode" number 16
Make CounterCode have no [SV] Overlay
Step 3
I gave the enemy the (16) state I named "countercode" by using the passive state script. (put this in the enemy notes <Passive State: 16>)
YEP.13 – Auto Passive States
http://yanfly.moe/2015/10/17/yep-13-auto-passive-states/
Explanation:
Anyway, based off the if statement, If spiked enemy has this state then it does this {a.addState(15) + a.setHp(a.hp - 1)} which gives the player the "counter" state
and takes away 1hp of the actor.
else
if the enemy does not have the 16 state then attack as normal
if (b.isStateAffected(16)) {a.addState(15) + a.setHp(a.hp - 1)} else {put your own attack formula here}
tip: b.isStateAffected affects enemy, a.isStateAffected affects the actor.
In the counter state you can change the SV motion and the SV Overlay to let the player have a reaction.
This same process can be used to create poison, burn, and spiked damage on the actor.
To tweak the damage formula even more; here is a guide I found to help with HP Regeneration and whatever else customization in the damage formula you want. I hope this helps!
https://www.rpgmakercentral.com/topic/36290-damage-formulas-101-mv-edition/
Last edited: