Can we separate trigger and hold

pasunna

Veteran
Veteran
Joined
Feb 3, 2019
Messages
172
Reaction score
27
First Language
thai
Primarily Uses
RMMV
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
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,336
Reaction score
328
First Language
German
Primarily Uses
RMMV
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.
 
Last edited:

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,455
Reaction score
939
First Language
EN
Primarily Uses
RMMV
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.
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!
 

pasunna

Veteran
Veteran
Joined
Feb 3, 2019
Messages
172
Reaction score
27
First Language
thai
Primarily Uses
RMMV
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.
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...
 

pasunna

Veteran
Veteran
Joined
Feb 3, 2019
Messages
172
Reaction score
27
First Language
thai
Primarily Uses
RMMV
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
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,455
Reaction score
939
First Language
EN
Primarily Uses
RMMV
Yes, I was just about to post that, haha. That should run when a key is released. :)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

You know, I sometimes ponder if working on the story and details is more necessary than the game itself. Its... technically work, just not direct.

Like for me specifically I never stop evolving the story based on what avenues I can approach in gameplay and then I get anxious thinking "hey good thing I thought about that now instead of later". Repeat ad nauseam.
World Of Final Fantasy Livestream~!
(Ft. Kaliga)
So my office building has 8 individually rented offices in it; 3 of which are social workers and 2 are marriage therapists... Unsurprisingly it always sound very angry out there. Glad I have my own private entrance. :LZSexcite: :thumbsup-right:
I wonder if there's ever been an art challenge that involves drawing faces from the generator.

Forum statistics

Threads
94,379
Messages
920,491
Members
124,152
Latest member
phiny
Top