equivalent for "match" command in Godot2D v2.1.5

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By mdswamp

This doesn’t seem to be a question. Please include more information and be specific about what you need help with.

kidscancode | 2018-09-02 18:18

Estoy buscando lo mismo,pero parece que en godot 2.14 o 2.15 no lo tiene GDscript

ariel | 2018-11-27 13:36

:bust_in_silhouette: Reply From: SomeGuy

There already is a “match” statement in GDscript:

He is looking for match in v2.1.5, not in 3.0. The answer i think is there isn’t.

p7f | 2018-11-27 16:19

:bust_in_silhouette: Reply From: p7f

As far as i know, there is no match in godot 2. You have to use if … elif … else like in python.

if case == 0:
elif case == 1:

Something like that