playMaker

Author Topic: quiz - loading & processing xml with images  (Read 1118 times)

elusiven

  • Full Member
  • ***
  • Posts: 233
  • Debt we all must pay...
quiz - loading & processing xml with images
« on: May 06, 2016, 11:35:38 AM »
Hi there guys!

I'm making a quiz function for my game, I have a title, 4 images and the images have a title as well. The player has to press on the image to hear the sound in English and then read  the title and pick the right image based on what is asking the title...

For example level 1 is; On which photo can you see a women?  And then if player presses on women picture he wins.

So I took a single scene approach to manage everything, and store levels in xml files.

4photos - is the name of the game mode ( i'm gonna have different ones too, or shall i store different game modes in different xml file?? Not sure...)

Example:

Code: [Select]
<?xml version="1.0" encoding="UTF_8"?>

<4photos>

<photolevel lvl="1">
    <title>Na ktorym zdieciu jest kobieta?</title>
    <photo1 correct="yes" phototitle="women"></photo1>
    <photo2 correct="no" phototitle="man"></photo2>
    <photo3 correct="no" phototile="boy"></photo3>
    <photo4 correct="no" phototitle="girl"></photo4>
</photolevel>
   
<photolevel lvl="2">
    <title>Na ktorym zdieciu jest chlopak?</title>
    <photo1 correct="no" phototitle="women"></photo1>
    <photo2 correct="no" phototitle="man"></photo2>
    <photo3 correct="yes" phototile="boy"></photo3>
    <photo4 correct="no" phototitle="girl"></photo4>
</photolevel>


</4photos>

Now the problem is... I need to read XML file with the values, then based on the values (maybe url links to images? or something like that) load the image urls from XML, then load the images and text and display everything on my levels.

I'm gonna make lots of levels +500, so I don't want to be storing images inside the app, that's why I want it to be external, and of course adding new levels in xml is easy & quick.

Big question is.. How do I make all this in playmaker????  Anyone can help prettyyyy please?