Amarok

Veteran
Veteran
Joined
Dec 15, 2016
Messages
298
Reaction score
733
First Language
Spanish
Primarily Uses
RMMV
Hello there! over the last months ive been working on my action rpg system for mv, the whole thing is done already.
Except for one detail, combos!

Of course, even trough eventing i can tell the engine to turn different switches on when pressing different buttons, but i need to know a couple things more like:

-letting the engine know the order the keys were pressed
-setting up a timer so the combination resets if no more keys are pressed after 30 frames (for example)

Has anyone any experience with this? or if someone has any idea on how to approach this problem, any help is appreciated!
Thanks a lot in advance :)
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
2,967
Reaction score
2,295
First Language
EN
Primarily Uses
RMMZ
Variables! :kaojoy: Here's a couple of ideas:
  • Have a number of variables to track button inputs and another to track which input you're currently on:
    Code:
    ◆Comment:Assumes you have the "ID" of the pressed button
    :       :stored in a variable called "button ID"
    ◆Control Variables:#0041 comboStage += 1
    ◆Control Variables:#0046 comboTimer = 30
    ◆If:comboStage = 1
      ◆Control Variables:#0042 input 1 += button ID
      ◆
    :Else
      ◆If:comboStage = 2
        ◆Control Variables:#0043 input 2 += button ID
        ◆
      :Else
        ◆Control Variables:#0044 input 3 += button ID
        ◆
      :End
      ◆
    :End
    If you know what you're doing and think it's worth it, it's possible to merge the inputs into one variable, e.g. if you know there's only 9 different valid button inputs (10 counting "no input"), use base ten and add inputs to the appropriate "column" of the number via multiplication (1, 10, 100, etc).

  • For the timer, you could have a variable that counts down via a parallel event:
    Code:
    ◆Control Variables:#0046 comboTimer -= 1
    ◆If:combo timer ≤ 0
      ◆Control Variables:#0041 comboStage = 0
      ◆Control Variables:#0042 input 1 = 0
      ◆Control Variables:#0043 input 2 = 0
      ◆Control Variables:#0044 input 3 = 0
      ◆
    :End
 

Amarok

Veteran
Veteran
Joined
Dec 15, 2016
Messages
298
Reaction score
733
First Language
Spanish
Primarily Uses
RMMV
*facepalm* of course! thank you so much :D this should be enough to make what i want, i said fighting games on the title but i was thinking of something like dynasty warriors so very basic inputs
 

Latest Threads

Latest Posts

Latest Profile Posts

Phew, sleep all day, awake all night. I don't know what to draw tonight!

Does that count as poetry? ..Is there a super fast way to test my creations in RPG Maker? Has anyone played the new Pokémon games? I'm itching to buy it but I don't think my husband will want me to after he finds out how much I spent on Christmas!
When can we get this?
RPG Maker MZ Saturn.png
Saturn port when?
I'm new to rpgmaker mv, link me some good stuff to learn.
Finally, I have graduated from college and now I can put a lot more work into my game, after having not worked on it for the better part of a year.
post so i can change my profile picture ^^

Forum statistics

Threads
117,069
Messages
1,104,288
Members
153,046
Latest member
peady
Top