I need help on air loss and air gain

so i am making a game under water but im not sure how to make the air bar go down automatically but im not sure how to do it and also gain air but with air bubbles in the level can someone help? the code is in the player i just need help adjusting it and adding to it

4 Likes

always proximity check for water, and have it get a -1 and add to the air (100), then make a nor logic gate off the proximity check and add 1, then add a filter of greater than 100 to make sure it doesn’t go over 100.

4 Likes