Ferda12's Forum Posts

  • 9 posts
  • Doesnt the Ajax entry in the manual give you any clues?

    I have read this, but only way looks:

    Request URL

    Send a GET request to retrieve the contents of a URL. A tag is provided to match it up with the On completed, On progress and On error triggers.

    But if I have in .php file for example, that $value=1, and use GET in game editor, I still don´t know how to get this value usable in game...

  • Hello,

    I have already successfuly figured out, how to get data from game and post them to database, but how to make opposite way? For example member has account, where I need to check if some value is 1 and if yes, car in the game will have double speed (example). I can get data from database, post them, but how to use them in game? If I use AJAX and request that URL, I probably got those data, but how to work with them in editor? New variable or? Thanks for help.

  • I have now opposite question How post something in game? If I will generate with php $variable , how to use this variable in game? Thanks in advance

  • Thank you very much, I´m idiot

    Now it is absolutely perfect, thank you so much again!

  • > Thank you, but I´m experienced in PHP, that thing about inserting in databse and getting data etc is clear for me as I wrote in my first post. Only thing I have problem is POST score from the game, because I don´t know what to write in which ajax column in game editor

    >

    ON ajax, select:

    Post to url:

    TAG (you can use on event of contruct2)

    URL (of the php file)

    Data: (the variables to send, like, if you have USERNAME and SCORE)

    "username="&variableofC2USERNAME&"&"&"score="&VariablescoreonC2

    method: "POST"

    with this, you will send:

    variableofC2USERNAME to username and VariablescoreonC2 to score on your php

    I have folowed your steps but not working. It just change the database column to 0, not reached Score. Name of my variable is score, I have Data column: "points="&Score""

    Then php get:

    $score = mysql_real_escape_string($_GET['points']);

    The database updating works, it change the amount, but to zero, I still think, that It is not posting score correctly

  • Thank you, but I´m experienced in PHP, that thing about inserting in databse and getting data etc is clear for me as I wrote in my first post. Only thing I have problem is POST score from the game, because I don´t know what to write in which ajax column in game editor

  • Anybody? If I post score via "&Score&", it doesn´t work, how to make it?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • What should I wrote to value field if name of my score is Score, so in value field should be "&Score&" or ?????

  • Hello,

    I have discovered this awesome program today and try to get familiar with it. I have successfully programmed tutorial game, but need to test how one things work (and if it is possible) before I will buy full license. How is possible to do that after gameover will be called .php file which will add score to database? I have seen tutorial, which explain this with some buttons. But I need one-time thing.

    Simply need to call my php file which is adding score into database once when member reach gameover.

    Thanks for help in advance!

  • 9 posts