Luca's Forum Posts

  • 3 posts
  • I solved my code is right, but the ajax request does not work in localhost(but work if you send data to remote php script), i uploaded my project in a webserver and now the health variable is set from the php script.

    EDIT: there is an easy way for sending and retrieve multiple data Because AJAX.LastDara Contain only one value and if i want data Like querystring data1=value1&data2=value2? or other serialize methods

  • tnx for the answer i already know this, but i dont know how to put them in the variable i do the following step in C2(it's a little pseudocode)

    Condition -> On start of layout

    Action->AJAX request "http://www.domain.com/test.php" tag GetHealth

    COndition-> AJAX "GetHealth" complete

    Action-> Player set Health to int(AJAX.LastData)

    IN test.php i only have this line of code

    echo 200;

    i only want to put this 200 on Health variable.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi i successfull use the "Post to URL" to sent a game variable to a remote PHP file and saved to mysql table.

    Now i want to get data from a remote PHP script and use this values for the game variables such us Player.Health, Player.ammo etc...

    But i dont Know how <img src="smileys/smiley19.gif" border="0" align="middle" />

    sorry for my bad english.

  • 3 posts