|
|
|
|
Attention |
Topic was automatically imported from the old Question2Answer platform. |
|
Asked By |
Noob_Maker |
|
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?
|
|
|
|
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!