Can we separate trigger and hold

I want to separate trigger button and hold button to do separate thing
Is this possible
I check on some other plugin(mog)
He still can’t separate it
(It and attck and charge attack in abs but it still go attack one time before it realized we holding the button)
So I wonder is it possible
Yes this is possible, how well this plays out ingame, is another one.

So you dont want:
Press X = Slash
Continue holding X = It starts to Charge Up.
In Past Zelda Games they did it like this, if i remember correctly.

You want:
Press X = you got up to 20 frames to release x button to execute a slash, if you keep holding it longer,
than it goes over in charge mode, when you release x in charge mode before its fully loaded, you execute no slash, when its full you would do special attack. player can move around while charging up. is this correct so far?

It could feel strange if the slash isn't executed with button press, but with button release, atleast for normal slashes. But a Testbuild will tell us for sure.

Instead of binding slash attack to a button, you should call it manualy with a plugin call or script call eventcommand if possible.
Than we could help you with the conditional branch logic for this.
A button can be in one of two states: up (default) or down. From there we get several secondary states, which in RMMV are named as follows (cf the Input object defined in rpg_core.js):
  • Pressed - button is down (this can be checked via Conditional Branch command).
  • Triggered - button is down and has only been down since this frame ("repeat time" is zero).
  • Long Pressed - button is down and has been down for at least 24 frames ("repeat wait" time).
  • Repeated - returns true once every 6 frames ("repeat interval") while long pressed.
Using switches/variables, you can mimic all of these checks with pure eventing, e.g.
Spoiler: Event example
Code:
◆Control Variables:#0020 Time = 1
◆Loop
  ◆If:Button [OK] is pressed down
    ◆Control Variables:#0020 Time += 1
    ◆Wait:1 frame
    ◆
  :Else
    ◆Break Loop
    ◆
  :End
  ◆
:Repeat Above
◆Text:None, Window, Bottom
:    :Button held down for \v[20] frames!
A button can be in one of two states: up (default) or down. From there we get several secondary states, which in RMMV are named as follows (cf the Input object defined in rpg_core.js):
  • Pressed - button is down (this can be checked via Conditional Branch command).
  • Triggered - button is down and has only been down since this frame ("repeat time" is zero).
  • Long Pressed - button is down and has been down for at least 24 frames ("repeat wait" time).
  • Repeated - returns true once every 6 frames ("repeat interval") while long pressed.
Using switches/variables, you can mimic all of these checks with pure eventing, e.g.
Spoiler: Event example
Code:
◆Control Variables:#0020 Time = 1
◆Loop
  ◆If:Button [OK] is pressed down
    ◆Control Variables:#0020 Time += 1
    ◆Wait:1 frame
    ◆
  :Else
    ◆Break Loop
    ◆
  :End
  ◆
:Repeat Above
◆Text:None, Window, Bottom
:    :Button held down for \v[20] frames!
the problem is it always execute the trigger one time before press or long press
I already do this in script

Yes this is possible, how well this plays out ingame, is another one.

So you dont want:
Press X = Slash
Continue holding X = It starts to Charge Up.
In Past Zelda Games they did it like this, if i remember correctly.

You want:
Press X = you got up to 20 frames to release x button to execute a slash, if you keep holding it longer,
than it goes over in charge mode, when you release x in charge mode before its fully loaded, you execute no slash, when its full you would do special attack. player can move around while charging up. is this correct so far?

It could feel strange if the slash isn't executed with button press, but with button release, atleast for normal slashes. But a Testbuild will tell us for sure.

Instead of binding slash attack to a button, you should call it manualy with a plugin call or script call eventcommand if possible.
Than we could help you with the conditional branch logic for this.
there are no release for input in rpg_core
and it weird because touch input have...
not sure if I already solve
Input._onKeyUp
I found this and experimenting on it
it work fine now but there maybe some bug That I'm not deiscover it yet
thank you
Yes, I was just about to post that, haha. That should run when a key is released. 🙂

Original thread: https://forums.rpgmakerweb.com/threads/can-we-separate-trigger-and-hold.117477/