Guitar Hero Collisions / And Gate not outputing

Hello I was trying to make a simple guitar game to teach my students and I was making a demo to see if it was possible and I was hit with a major problem. When I press the a key and the collision is true there is no output from the and block. Not sure what I am doing wrong. Any guidance would be greatly appreciated.

https://flowlab.io/game/play/2251226

2 Likes

Maybe set the Keyboard behavior to Repeating? I find that when using the AND Logic Gate with a Keyboard behavior, the repeat setting often helps a lot unless you want insanely precise timing (which no one wants unless they’re making a FromSoft game).

an and gate is detecting if it happened the same frame
no one is frame perfect

instead, make the collision start a 0 second timer that repeats for 30*seconds that you want the hit to still be viable after pass

2 Likes

Yes, the repeating function works thanks I figured it constantly checked if it was touching or not apparently the collision detection is for only 1 frame

1 Like

Thanks this is a great idea I can just make a mini-timer after the collision because one is frame perfect.

1 Like

that’s complicated, the keyboard repeat works way simpler

No problem kirtis.

with keyboard repeat you could just hold the key down and get a hit

3 Likes

It could have been explained slightly better, but yes, galactians method is better than repeating key press.

Proximity is also another option instead of using Collision (dw, I won’t complain about performance this time)

2 Likes

I ended up using nonrepeating key and making a simple timer and switch Im sure there is a much better way than what I did below. Alpaca the proximity block would probably be the best way it would be the most reliable I might try that as well and see if I get more reliable results.

I tried Alpaca’s way and its way simpler and way better thanks a bunch this is what I should have thought of initially.
Flowlab-Game-Creator-Copy-of-Guitar-Hero (1)

4 Likes