Motorjam

Warper
Member
Joined
Oct 10, 2017
Messages
2
Reaction score
0
First Language
English
Primarily Uses
RMMV
My friend gave me this cool idea for an ability where if you have a buff for any stat you get a buff for every stat, and I've gotten everything down except for checking if the target has a buff. Any way to do this in Action Sequence?

EDIT: I messed around with it for another few minutes and got it, but if anyone can improve it, please let me know


<setup action>
clear battle log
display action
immortal: targets, true
perform start
wait for movement
cast animation
wait for animation
</setup action>

<whole action>
if (target._buffs[0] > 0)
change switch 4: on
end
if (target._buffs[1] > 0)
change switch 4: on
end
if (target._buffs[2] > 0)
change switch 4: on
end
if (target._buffs[3] > 0)
change switch 4: on
end
if (target._buffs[4] > 0)
change switch 4: on
end
if (target._buffs[5] > 0)
change switch 4: on
end
if (target._buffs[6] > 0)
change switch 4: on
end
if (target._buffs[7] > 0)
change switch 4: on
end

if $gameSwitches.value(4)
add atk buff: target, 4
add def buff: target, 4
add mat buff: target, 4
add mdf buff: target, 4
add agi buff: target, 4
add luk buff: target, 4
end
death break
</whole action>

<target action>
</target action>

<follow action>

</follow action>

<finish action>
immortal: targets, false
change switch 4: off
wait for new line
clear battle log
perform finish
wait for movement
wait for effect
</finish action>


if there's a better way to do this, like a for loop and a variable instead of testing each stat individually, again, please let me know!

EDIT 2: Breaking news! the move doesn't work in game??? whenever I use it, it gives me the error "Cannot read property 'toUpperCase' of undefined" and when I look at the console it shows all the action sequence packs and the YEP battle engine core have errors, what's going wrong?

EDIT 3: man I'm not good at this, turns out I put "change switch 4 = off" instead of "change switch 4: off" in the note tags for the move. the move works and it's super cool. if you can improve it tho still reply :D
 
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

Hot chocolate and music make studying and note-taking much easier :kaoluv:
Until my hand cramps up from writing too much!
Doing RPG Maker News for 21st September 2021


Malak is still waiting for Dark Deception Chapter 4... This was him yesterday after another sugar crash.
Again, he's fine. He's just bored at this point, considering he's exhausted his entire vacation bucket list.
Am I the only one who files custom resources under specific folders to remember who to credit? :kaoswt2:
1632263519730.png
I always smile to myself when I see someone do the "immediate halt and spin around" from forgetting something. I find it sort of endearing how we all do it without ever being taught to.

Forum statistics

Threads
115,263
Messages
1,088,445
Members
149,868
Latest member
MOAII
Top