How to make a hint attribute/table for a game with 50 levels

hi.... i am working on a quiz game and i almost finished making it but while testing i realised that the questions are too hard so i wanted to make a hint table for those 50 scenes.... so how can i make it??.......

can we make a attribute like
when scene=1 change attribute to 1
when scene=2 change attribute to 2
when scene=3 change attribute to 3
and so on......

or there is a better way if you use tables?

and also in the hints scene i want to make a actor like
If Hints attribute=2 change image to (hint-2)

Please help.... Thank you

Comments

  • imjustmikeimjustmike Member Posts: 450

    Use the scene attribute to call a row in a table using the tablecellvalue function.

    Can also constrain an image to this attribute if you append a number to your images eg hint_1.png

  • Kool TalentKool Talent Member Posts: 7

    I don`t have any scene attribute?!?

  • imjustmikeimjustmike Member Posts: 450

    @Kool Talent said:
    I don`t have any scene attribute?!?

    @Kool Talent said:
    can we make a attribute like
    when scene=1 change attribute to 1
    when scene=2 change attribute to 2
    when scene=3 change attribute to 3
    and so on......

    That scene attribute. The one you asked about making.

  • KevinCrossKevinCross London, UKMember Posts: 1,894
    edited June 2016

    I wouldn't use a scene attribute but create one game attribute that you change each time you move to the next level/scene. So on the code that goes to the next scene you change the game attribute to match the scene number you're about to go to. i.e.

    Rule: [When level 1 completed]
    ..Change Attribute: game.hintNo = 2 for level 2
    ..Play Scene: Level 2

    and

    Rule: [When level 26 completed]
    ..Change Attribute: game.hintNo = 27 for level 27
    ..Play Scene: Level 27

    Then you can reference the table row number with that attribute and show the text from the correct row and column i.e.

    Display Text: tableCellValue(Hints, game.hintNo, 1)

    And if you want to show the hint as an image you can do something like this (you don't need tables for this though):

    Change Attribute: self.Image = "Hint_".game.hintNo

  • imjustmikeimjustmike Member Posts: 450

    Ah, that's exactly what I meant - by scene attribute I meant a game attribute called game.scene (probably since I use a similar set up to control fake 'scenes' - I never actually use multiple scenes, I hate that little loading wheel)

    Other than that, we're describing the same thing :)

Sign In or Register to comment.