Need Help

I am still pretty new to coding but I have been working on a simple game on my own. It is a 2D side scroller in Godot. The issue I am running into is this. I would like my Player controls to be disabled when my charector crosses a finish line. I dont want the whole game to stop just yet or freeze. After the character crosses the finish line I want it to just play a bit of Audio and maybe an anamation before moving on to the next level. I have the Audio and anima covered I just cant figure out how to freeze Player control temporaraly. If you have a function or an idea on how to code this in please let me know. Thanks :slight_smile:

Hi, if its 2D, and just a thought, you could always change the rigidbody mode to be static instead on the fly?

mode = RigidBody2D.MODE_STATIC

I guess you could just create a boolean called something like ‘finished’ and set it to false.

Then wrap your movement controls in an ‘if not finished’.

As you cross the finish line, you set ‘finished’ to true.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms