I have a Phase Battle system, and I want players to be able to press a button to momentarily increase their defense during enemy attacks.

Currently I have this set up using four sequential "Wait for Input" node with the "block button" Input, with the first node triggering a missed block, the next triggering a normal block, the third triggering a perfect block, and the final triggering a missed block.

Obviously that's kind of convoluted and I'm sure there's a way to do it better. I'm aiming for the real time blocking of the Paper Mario and Mario and Luigi RPG games. It would smooth things out in the long run if I could design the "block" ability as separate hidden ability that is usable in real time during an enemy's turn. It would also make timing of enemy abilities more consistent and add flexibility to the block function. Any ideas on implementing something like this?
  • Hm, I'd say using global events is the way to go.

    The enemy attack could e.g. set a bool global variable to control when the global events can be used (variable conditions on the event). To use the correct combatant that's being attacked, you can store it into global selected data using a Select Combatant node - that allows you to access the combatant that is attacked in the global event via the same selected data key.

    Now, you just need to set up your global events (e.g. started via the input keys) to do what you want.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • I will work on this and see how it pans out! Haven't messed with global events yet but it definitely seems like this will be a much more efficient way to make ability timing consistent. Thanks for your time as always!
  • What node do I use to actually store the selected data? I think I understand how to access the selected data but I'm not sure I'm storing it correctly, do I use the Select Combatant node to Select or Store? or both?
  • The Select Combatant node will store the selected/found combatants into selected data.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.