Salvation's Recent Forum Activity

  • From: scirra.com/manual/107/ajax

    "Also, when previewing in Construct 2 the game runs on localhost. This counts as a different domain to the rest of the internet, so typically AJAX requests to any web page will fail during preview, unless the server explicitly allows cross-domain requests."

    I'll upload the exported file and see if it works, then.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Usage:

    <img src="http://puu.sh/32dmD.png" border="0" />

    XML content:

    <?xml version="1.0" encoding="utf-8"?>
    <Voyage>
         <Specification title="Save The Princess" morale="1" strength="2" agility="3" speed="4"></Specification>
    </Voyage>

    voyage_widget is a sprite I use as button; when it is clicked I want it to load the XML file.

    Now, if I just pass on the actual content of the XML file in the XML.load function, Text.setText is correctly setting the title of the textfield to "Save The Princess".

    However, trying to load from file simply fails on me.

    Thanks for that link by the way, I have figured out the parsing... now it's just the loading :(

  • I am making a game which (in short) is an array of quests, in random order.

    When the quest_button is clicked on, I want to load a random quest. Now, the randomization is not the issue here.

    I thought about using XML:

    <?xml version="1.0" encoding="utf-8"?>
    <Title>Some Quest</Title>
    <Morale>1</Morale>
    <Strength>2</Strength>
    <Agility>3</Agility>
    <Speed>4</Speed>
    

    I can load the file using XML's load function, but how do I access the values? EG: How do I set a global variable named current_speed to the speed defined in the XML file, in this case 4.

    Of course, I do not have to stick to XML so if any of you know how to do this either with or without XML, please do help me out on this one.

  • I think I have the exact same issue, how would I change the MIME types?

    Edit: nevermind I found it under the advanced options in my ACP.

Salvation's avatar

Salvation

Member since 25 Apr, 2013

None one is following Salvation yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies