ramones's Recent Forum Activity

  • The Touch plugin uses that same code to get the device orientation.

  • You can give the expression the ef_variadic_parameters flag.

    https://www.scirra.com/manual/19/action ... xpressions

    [quote:2uvw1hc6]

    ef_variadic_parameters

    Construct 2 will allow the expression to be used with additional 'any type' parameters past the end of those specified. Any parameters that are specified will still be required and type checked. If no parameters are specified, the expression can be used with any number of parameters at all.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So what does your JSON look like?

  • It's whatever the root folder for your server is configured to. It depends what server you are running. Basically it's the folder you're exporting your project to. If that top-level index.html is at http://localhost/index.html then the JSON file would be http://localhost/UserData/MyData.json.

  • If you are putting the JSON into the C2 event sheet directly it has to be a string enclosed in quotation marks and so you have to escape any quotation marks inside the string with an extra pair. That's fine. If you load the JSON from a file, you don't need the extra quotation marks.

  • Try posting the URL without the "https://www" part.

  • Set oid to XML.NumberValue("@id") and put that just below the "create object Sprite" action.

    Also for it to work in IE you'd need to use "xpos/text()" and "ypos/text()".

  • It looks like you're trying to access the array before it has loaded. The "on start of layout" events that request the file and create the text object happen on the first tick. The "on 'words' completed" event happens some time later when the file has loaded. You'd want to move "set text to Words.At(0,0,0)" to the "on 'words' completed" event.

  • You need a root element. You can only have one root element in an XML file.

    "<?xml version=""1.0""?>
    <builds>
      <build>
        <xpos>500</xpos>
        <ypos>500</ypos>
      </build>
    
      <build>
        <xpos>100</xpos>
        <ypos>200</ypos>
      </build>
    </builds>
    "
    [/code:a3ah0qg7]
  • You could use else.

    obj1 is visible -> obj1.destroy

    else

    obj2 is visible -> obj2.destroy

    else

    obj3 is visible -> obj3.destroy

    ...

  • I tried it out - it's way slower in Chrome then Firefox. Looking at the code it removes each element one at a time so it's not surprising. Clearing the lists in one go with JavaScript is faster. It's instant in Chrome with 10 lists of 1000 items each. Still a bit slow in Firefox but faster than the clear action.

    clearLists.capx (r200)

ramones's avatar

ramones

Member since 17 Apr, 2012

Twitter
ramones has 4 followers

Trophy Case

  • 12-Year Club
  • x4
    Coach One of your tutorials has over 1,000 readers
  • x2
    Educator One of your tutorials has over 10,000 readers
  • Email Verified

Progress

15/44
How to earn trophies