Changing Scene

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

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    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

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    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

  • tammywkwongtammywkwong Member Posts: 10

    Any tutorial about how to using table to changing scene? Thanks

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited March 2016

    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

Sign In or Register to comment.