New to Flow Lab


I was doing the video tutorial and when I real 0 the game doesn’t restart. The counter keeps going inti the negatives. Did I do something wrong in the code? When I look at the video everything looks good.

Thanks

Paul

2 Likes

The videos were made years ago before a lot of recent updates. The Filter behaviors inputs have been swapped. What you currently have set up would work about 3 years ago.

The Health number behavior should go into the filter’s “in” input instead of “value”. Because it’s constantly updating the value of the filter based on what the health is. If you touch spikes for the first time, it’ll set the health to 2 and it’ll also set the filter to 2. Since it’s checking for a number less than 2, it’ll never trigger.

So, you basically just want to re-wire the Health number to the filter’s “in” input instead of “value”.

5 Likes

Hello Paul, welcome to the community.


Take a close look at your HP code. The “3” number value is connected to the “Value” input on the filter. This input changes the Value of the filter. Basically, when the -1 is inputted into the “3” value, it changes the Filter to “Less than 3”, and not number goes “In” and checks the “Less than”.

Cut the line to the Value input and change it to the In input. This should work.

If you need any other help, tag me (@JUSTPLAINOP), and I’ll see what I can do.

-Ember.Y

1 Like

thank u very much`I have it working now

1 Like