while is conditional meaning it needs a bool true or false value but get_overlapping_areas() returns an array. The array type has the size() method which returns an int so an operator (<, >) can be used to return a bool.
while get_overlapping_areas().size() > 0:
but it still doesn’t work
while get_overlapping_areas().size() > 0:
position.x += 1
lalel345 | 2021-02-11 21:34
In the question, by ‘when the area collides’ did you mean with only other areas? If not you should be using get_overlapping_bodies() if you want to detect static, rigid & kinematicbodies.
Magso | 2021-02-11 23:59
while get_overlapping_areas().size() > 0:
will cause an endless-loop (game stops working) if size is not 0.