Changing Scene
tammywkwong
Member Posts: 10
I would like to know if the "Go To" at index -- scene index, may i use expression like "Level "..Current Level?
Because i tried, it seems not work. The Current Level is the Game attribute. I used the display text to check the value, it is correct.
Another question is does GS (window version) modify font size feature? Because I saw the font size under the display text rule was grey out?
Comments
The scene index will only accept numerical values. So yes, expressions are fine (e.g. game.Level+3) but not text expressions.
I don't know the answer to your question about font sizes.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
You could get a little tricky and add all of your scene names to a table (either manually or at runtime) and then check to see if the text expression matches any of the table values and if so, change to the corresponding scene number. But you'd have to already know the scene order (which you should!) and populate the table with the numerical values.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Any tutorial about how to using table to changing scene? Thanks
No, I don't know of one. There are plenty of tables tutorials though. Just Google gamesalad tables and watch a video.
My idea would be to set up two table columns like this:
1 Beginner1
2 Beginner2
3 Beginner3
4 Intermediate1
5 Intermediate2
...
Then, you would use a Loop Over Table behavior or a tableSearch function (Google gamesalad tablesearch) to figure out which row (searching through column 2) contains game.level..game.currentLevel and then Change Scene to the value in column 1.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User