how to make an event happen when a certain velocity is hit?
You'll have to be more specific. What velocity are you interested in? One of your own or the one reported by get_linear_velocity()? Also what axis are you interested in? X or Y? Or did you want to measure magnitude? Then what do you consider an "event"? A custom signal?
It sounds like an if statement.
if velocity == x: # or , >=, <=, <, >
But maybe you want something else.
Give us more details, as avencherus said.
when the player( rigidBody ) if falling so -y axis and hits 0,-200: the scene will reload. oke?
A basic example for that would be:
const MAX_VELOCITY = 200
if(get_linear_velocity().y > MAX_VELOCITY):
print("Do reload here")
sorry, but there is an error it says: Invalid operands 'float and 'nil' in operator '>'.
no, thanks for helping!