How do I Use XML attributes?

0 favourites
  • 3 posts
From the Asset Store
Impact fx, explosions, fireballs, puffs of smoke, magic fx, lightning fx, bonus & pick-up fx, blood splatters, and more
  • Hi every one, sorry from my english I'm from spain. I'm making a multilingual quiz wich questions appair randomly. I'm storing texts from some XMLs, this is the structure:

    <ques>

    <q>question</q>

    <op>option1</op>

    <op>option2</op>

    <op correct=true>option3</op>

    <ques>

    I want to use the atribute correct to set te correct answer because the correct answers is not always the third obviusly. How can I do that or is there an other way to make easier to set the correct question?

    Thanks you every one

  • Here is an example of simple quiz depends on XML

    I used this xml

    <?xml version="1.0" encoding="utf-8"?>

    <questions>

    <question no="1">

    <title>Capital of France</title>

    <correct>3</correct>

    <answer>Lyon</answer>

    <answer>Marseille</answer>

    <answer>Paris</answer>

    </question>

    <question no="2">

    <title>3x2</title>

    <correct>2</correct>

    <answer>5</answer>

    <answer>6</answer>

    <answer>7</answer>

    </question>

    </questions>

    If you change global variable you can skip to other questions

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you

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