Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Register

Keys "sticking" in behavior bundles

edited April 2019 in Bugs
Okay, this is just bizarro - under certain circumstances, SOME of my key triggers stop making any kind of sense whatsoever:

(Please, no comments on graphics; obviously, I'm still in the placeholder phase of development.)

Look in the player object (grey square centered at bottom of screen), within the "Steering" behavior bundle.

Key presses work fine at the beginning of play. But once you've collided into a wall (use l or r arrows to steer; car accelerates without input - the game is a "soapbox derby" downhill racing challenge), watch the key triggers in the "Steering bundle" - about 75-80% of the time, when the vehicle respawns, one or the other of the arrow keys "hangs." Sometimes, it sends "up" triggers continuously, sometimes it sends "down" triggers continuously, and sometimes (impossibly) it sends *both "up" and "down" triggers continuously at the same time.*

Note that this doesn't happen with the spacebar key trigger in the "Accel and brake" behavior bundle - this is only happening with the "Steering" bundle. I've also tried reassigning the keys - using "A" and "D" instead of left and right arrows - but the same thing happens then, too.

Now, if one key were doing one or the other sporadically, I'd say "stuck key, hardware problem." But there's not a switch in the world that can be both open and closed at the same time, both left and right keys are doing it, regardless of the actual key bindings - and the problem is the same on multiple computers. So, not hardware.

The problem is persistent, too. Once a key hangs, it hangs until I either exit the game and go back to my flowlab home screen or refresh the browser. Restarting the game, or cycling in and out of edit mode with the escape key doesn't resolve it.

Any ideas?


  • edited April 2019
    The problem persist because the object is deleted while a keyboard input is active.
    This is a common bug in Flowlab and can be really annoying.

    I can think of 2 solutions for this:
    1. Delete the object after the up input after hitting the wall.
    You could use the collision to, instead, set the alpha to 0 (make invisible), velocity to stay at 0 and turn a switch on to delete the object from the up input from the keyboard.

    2. Never delete the object.
    instead of deleting and responding the player object,
    just make the alpha to 0 and velocity to stay at 0 until you start again.
    When you start again, just re-center, re-enable and make alpha to 100.
    You'l be changing some of your code for this one but is more reliable.
Sign In or Register to comment.

| make games in your browser
@ 2017, All rights reserved.

Contact us

Get In Touch