[XP] Keys, repeating keys, FRUSTRATION

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 44
Overlord in Training
So I'm doing a CBS that requires heavy custom key use.  8)

I want to be able to register the input of a key one time, and not register it again until released and then pushed again. As of now, I have to use the wait command, but that just generates lag, and doesn't stop the repeating.

If you want a specific example, here it is:

I use the key A to bring up the menu,
I use the key A to select a command: Move,
then I use the key A to choose a destination.

As of right now, the button will bring up the menu and immediately jump to the first command on the list, because it repeats. Using wait x amount of frames only creates lag and doesn't prevent the repeat.  :mad:

Believe me, I did a search for this, and did not find what I was looking for...with some exception. Do I need to go out and get a custom keys script? Or is there a simpler way I'm not catching? I've experimented a little, but it just hasn't clicked yet.

This is essential to improving gameplay experience, if you help me, I will appreciate it very much, and you'll end up in the credits in my game  :blizj: (for whatever that's worth haha.)

Thanks. :D
« Last Edit: May 26, 2015, 12:58:16 AM by yuyu! »

*
*crack*
Rep:
Level 63
2012 Best Newbie2012 Most Unsung MemberFor frequently finding and reporting spam and spam bots
A screenshot of your code/event would help.

Code: [Select]
Input.trigger?(:A) # Only registers once

**
Rep:
Level 44
Overlord in Training
Ok, but it's gonna be ugly...Its a tactical battle system. I can give a more primitive example that would equal essentially the same thing. BRB

In an ideal world, pic1 would not flicker when a is held. But rather, I would have to release and then push again to change anything.

This is an oversimplification, but a sufficient example.

Btw, can I really copy and paste that code.? Will it work?

« Last Edit: January 30, 2013, 01:34:24 PM by Razma »

**
Rep:
Level 44
Overlord in Training
So I pasted that code in the event, and the only thing that happened was that a did not seem to register at all :p

*
Rep:
Level 81
You'll have to use:

Code: [Select]
Input.trigger?(Input::A)

with RMXP.

Put it as a script entry in a conditional branch. So instead of having 'Conditional Branch: Key A Pushed' it will say 'Conditional Branch: Script: Input.trigger?(Input::A)'

I tried this with a parallel processed event that showed a picture for 60 frames then erased it only if the 'A' key was pressed (which is 'Z' or 'Shift' by default). The picture only showed for that ~1 second then disappeared once no matter how long I held the A key for.
(Why do I always feel like it's the end of the world and I'm the last man standing?)

**
Rep:
Level 44
Overlord in Training
Thanks Logan! You are always so damn helpful. It did the same exact thing for me just now! (I guess you did know the answer after all, haha.)

Thankyou also D&P3, I just realized I did not specify that I was using RMXP, I appreciate your help as well.