Case thyme structure
3 posts • Page 1 of 1
Case thyme structure
Sometimes you need to run few different lines of code depends on condition. Usually we add few IF -THEN - ELSE statements, but there is a better way to use case-alike code:
should do the trick!
- Code: Select all
[{code1},{code2},{code3}](index)()
should do the trick!
Dream of Algodoo as game development engine...
-
Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
Re: Case thyme structure
Sorry for my noobiness, but what does the index do? Can you show me an example? I'm so bad at thyme sooo...
.
-
icrls984 - Posts: 80
- Joined: Thu Jun 13, 2013 6:33 am
Re: Case thyme structure
the index is a number to specify which code gets executed, so if it says 0 it should execute code #1, if it says 3 it executes code #4 (because 0 is always the first object)
- FRA32
- Posts: 229
- Joined: Wed Dec 03, 2014 9:51 pm
3 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 15 guests