ramones's Forum Posts

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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)

  • You have to enter the regex and flags as strings.

    RegexSearch("I am searchingforthisterm", "^searchingforthisterm", "")[/code:2vub40wo]
    [code:2vub40wo]RegexSearch(VarA, "^" & VarB, "")[/code:2vub40wo]
    
    You can use the [b]right(text, count)[/b] expression to get the last character
    [code:2vub40wo]right("some text", 1)[/code:2vub40wo]
  • You could use the timer behavior: textChangedTimer.capx (r200)

  • Currently, when enemies are destroyed they spawn an item, could the changing of the layouts, be "destroying" the enemies and would that enable their items to then be spawned on the new layout created?

    Yep that's what happens.

  • Set text to

    uppercase(left(text, 1)) & right(text, len(text) - 1)[/code:2m1c10yd]
    
    *edit* if you want the rest of the text to be lowercase
    [code:2m1c10yd]uppercase(left(text, 1)) & lowercase(right(text, len(text) - 1))[/code:2m1c10yd]
  • Get ready to kick yourself. You have the username and password mixed up - you're sending the username as the password and vice versa.