RMMV Yanfly Action Sequences Checking for Hit, Miss, or Evade...

zerobeat032

Cloaked Wanderer...
Veteran
Joined
Mar 28, 2014
Messages
357
Reaction score
588
First Language
English
Primarily Uses
RMMV
So I have tried a few different combinations of the following tags and I can't get them to work as intended... Other if...else... statements seem to work fine except one's related to Hit, Miss, or Evade. I've tried various things I've seen on the forums, but nothing is working as it should. Yanfly's Action Sequences allow for if... else statements in case you didn't know.


if target.result().isHit() = It should only do the attack if the target is hit right? but it will do it hit or miss

also if (target.result().hpDamage > 0) doesn't seem to help either...

if target.result().missed || target.result().evaded seems to work, but when I put an else in there for if it does hit... it starts to trigger the move even if it missed now, which it won't do if I don't put an else in there.

if !target.result().missed || !target.result().evaded I tried this as I think I remember ! means basically to check if it doesn't miss or evade. Correct me if I'm wrong on that one.

basically anything that's only suppose to happen on hit, doesn't work right. it always seems to do it if it hits or misses unless I use the one strictly for missing... but then an else statement messes that up. if anyone knows what I'm doing wrong, I'd love the assist. thanks everyone.
 
Last edited:

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
920
Reaction score
579
First Language
English
Primarily Uses
RMMV
Nested ifs in action sequences don't work.
Since you didn't post your action sequence, it's hard to tell that's the problem here, but it sounds like it. SergeofBIBEK has a plugin to correct this. Try that and see if it helps.
 

zerobeat032

Cloaked Wanderer...
Veteran
Joined
Mar 28, 2014
Messages
357
Reaction score
588
First Language
English
Primarily Uses
RMMV
I actually am using that plugin lol, I realized I needed to, to even attempt some of the stuff I was trying to do with if... else statements. but while the sequence doesn't crash or anything, it doesn't quite work as intended either. BUT, I found an odd work-around that did in fact work...


if (target.isStateAffected(x))... I used a dummy state that doesn't popup at all during the fights and is added like normal if the attack hits through MV's normal add state option. but otherwise, I can't get anything to work QUITE as I intend it to. here's one of the action sequences.


<target action>

jump user: 100%, 24

motion skill: user

wait: 12

motion attack: user

wait: 8

VOICE user: heavy

action animation: target

wait: 8

action effect



if target.result().isHit()

eval: Rumble(0.6,0.2,500)

motion spell: user

animation 162: user

wait for animation

add state 21: user, show

end

wait: 24

</target action>
 

Latest Threads

Latest Posts

Latest Profile Posts

Time to add the support for import/export default RMXP maps. Maybe there will be customized tileset support later. In theory, I can reimplement the entire RMXP inside this RMXP-made game to make more RMXP games. :kaojoy:RMXPFORMATSUPPORT.jpg
Gonna make a story driven game someday in RPG Maker about this diseased character in my head. Will keep you posted, although I was warned by the authorities that posting too much would be considered 'spamming' so I WON'T SPAM. It'll be before I go in anyways. It's gonna be messed up but it won't be explicitly pornographic so don't worry, I'll give all the content warnings. :barf::barf::barf:
If you're a RM plugin developer, and you're reading this...

Thank you. You're awesome. Even if I haven't used your plugin, your work is appreciated.
Ami
tomorrow is the finale of my Endurance

Forum statistics

Threads
111,265
Messages
1,059,699
Members
144,552
Latest member
adcurro32
Top