Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | 1Snakel | |
Old Version | Published before Godot 3 was released. |
Is it possible to do something like this? If not does it have planed to support?
velocity = velocity * if (grounded): friction else: 0
AFAIK there is no statement like this, but I this there was/is a discussion about it
timoschwarzer | 2016-07-02 07:43
If there’s something implemented like that, it should be the ternary syntax:
velocity = velocity * friction if grounded else 0
Gokudomatic2 | 2016-07-02 15:34
Dear Lord NO! Please, if anything, just implement the ternary operator.
Having the ability to inline full blown if statements ? This is the stuff TDWTF is made of.
eye776 | 2016-07-03 00:55