Counter fail bug

I tried making a double jump limiter, using a filter and a number, so you only can jump twice, then the counter resets the number to 0 jumps, but the processed number keeps climbing, even though the real number is at 0. I know it has (in) and (+), but ignore that. It was still doing it with only (+). The number keeps rising, but stays at 0.
as

Hey… I was planning to make something like that, double or triple jump in my Super Smash Bros game, but I couldn’t figure out how. Maybe @grazer can set a logic example

It used to work, but everytime grazer updates the site, my games stop working right, so I don’t really put too much work into my projects anymore, in fear of data corruption. I used to spend months building impressive test games, but that was in the early beta. I do however want to make a proof of concept game, to attract coders to help me produce an online/bluetooth multiplayer game, with zero lag. Flowlab is a great site to build your smartphone games, but it doesn’t export to consoles, so I like to use it to build concept games.

Hey Mhx,

That screenshot is from a super old version of Flowlab - does it behave correctly in the current version? You can test it by adding “?v=2” to the end of the game url. If you want, I can upgrade that game to use the latest engine and editor - that may fix whatever issue you’re having.

It’s a new game I just made. Weird that it isn’t already on v2. I was just testing physics.

Heh, i recall those days

The double jump works now with ?v=2, but I’m a bit stuck with a different issue.
I’m trying to figure out how to glide through the air, using like 12 forward velocity, without it disabling jump.
When you use forward, instead of x, you glide to whatever side you are facing, but then you cannot jump.
If you use x, you move that direction, and can jump, but do not glide, you just fall. It’s like forward disables gravity.

Actually, I seem to have gotten it to work. Use A to glide. The weird thing is that every time I refresh the page, all the tiles move to random areas. It’s whatever, since it’s just a physics test stage. http://flowlab.io/game/play/175745?v=2

Interesting concept.

The reason that the behavior works the way you describe is that the when you set the velocity, it replaces the current value. This means then setting the “forward” velocity will replace the velocity along both the x and y axis, cancelling out any impact that gravity has along the y axis.

Maybe it would be worth adding incremental inputs to velocity like we have for position, so that we have a “+x”, “+y”, and “+forward”. That would allow the behavior I think you were looking for.

I think it works relatively alright for now, but I’ll definitely try that idea in the real version, if I can ever get that 8 directional shooter function to work, because every once in a while, the box only does a short jump, instead of a full jump, and that could end up ruining someone’s far jump.

Use a velocity instead of an impulse, that way it always goes to the same speed, no matter how fast it falls and stuff

I did. Impulse doesn’t work mid-air.