How do I set a lot of information the right way

  • Hi!

    While i am working on my game i really got the feeling i'm not doing it right..

    I have a quiz game where i got of course a lot of questions and answers.

    As for now i use this:

    And to check:

    Something tells me this can be done way much quicker, easier and better.

    The way i check the correct answer is a good working and easy mechanism if you ask me.

    I've got like 800 questions.. So that's why i want to be sure i am doing the right thing.

    Can any one clear me up about this one if this is the way to go or not?

    Thanks!

  • i love tokenat very very much

    my english not good at all

    here is what my suggest

    [attachment=1:2i0unitq][/attachment:2i0unitq]

    [attachment=0:2i0unitq][/attachment:2i0unitq]

    (PS:tokenat slow for >20mb text)

    =================

    tokenat(src, index, separator)

    Return the Nth token from src, splitting the string by separator. For example, tokenat("apples|oranges|bananas", 1, "|") returns oranges.

    =================

    tokencount(src, separator)

    Count how many tokens occur in src using separator. For example, tokencount("apples|oranges|bananas", "|") returns 3.

    =================

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks for your reply.

    Though i think this does not completely suits my game best.

    I do like the the way it uses separators.

    Is there a way to store info like:

    If level = 1 : Infos = "A|Answer1|Answer2|Answer3|Answer4|1"

    Than read it as "idontknow(3)" which should result in "Answer2" , "idontknow(6)" should result in "1" etc?

  • Thanks for your reply.

    Though i think this does not completely suits my game best.

    I do like the the way it uses separators.

    Is there a way to store info like:

    If level = 1 : Infos = "A|Answer1|Answer2|Answer3|Answer4|1"

    Than read it as "idontknow(3)" which should result in "Answer2" , "idontknow(6)" should result in "1" etc?

    No,this is 100% completely your game

    just you didn't get it at all

    working demo(in chinese)

    http://fc-hk.net/index.html?welcome

    [attachment=0:3hozphrg][/attachment:3hozphrg]

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)