How do you do AND NOT statements in GDscript?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Noob_Maker
:warning: Old Version Published before Godot 3 was released.

I want to do a command saying:

if player is touching a wall AND NOT touching a ground, do “this”

I know that is not how GDscript looks like but that’s the jist of that the command I want to tell. So how do you those kind of statements?

:bust_in_silhouette: Reply From: whooshfrosted

Its the same as C like languages.

&& = AND
! is NOT

if touching_wall(player) && !touching_ground(player):
do this

See Operators here:

I just noticed you can use ‘and’ instead of ‘&&’ and ‘not’ instead of ‘!’. Cool!