Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Problem with the keyboard module

Riku

Member

hey guys^^
my problem is the keyboard module from cybersam.
The function that the key is pressed once doesnt work for me Oo
ok here my example when I start a new project.

I put the script into the script editor above main.
Then I create on a empty map a paralell event with a condition fork.
In the script box I put in Input.pressed?(Input::Letters["A"])
Then I play sound.
I start the game and press down A.
The sound plays without a pause. how it should be

But If I write in the scriptbox Input.triggered?(Input::Letters["A"])
The sound is played randomly while pressing down Letter A.
Before it plays the sound it waits a random number of time. <<<strange or not?

In the normalcase he should be played once with every time I press Letter A down.
heres the project with the problem^^
http://www.megaupload.com/de/?d=A6BL01MI

plz help me:D
 
For some reason the sound doesn't play at all for me. I'd like to help you, but first I have to know exactly what the triggered? module does. If I know what your trying to do maybe we can simply create a make-shift module in place of the "triggered?" one if it doesn't work.
 

Riku

Member

first thx for posting XD
ok I want a function that can check if a key is pressed once.
So the commands after the checked key will be activated with everytime the key is pressed down.
like "trigger?" it do but it doesn't work with the module...

I hope you understand and help ^^

bump
 

Mac

Member

Btw theres been a change in the forums, i don't expect everyone to notice them to be honest but bumping limit has been raised to 72 hours.

RGSS Support Ask questions about Ruby Game Scripting System here. Wait at least 72 hours before bumping.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top