Saad Swad's Recent Forum Activity

  • OK I understand now.

    To do that, you must create columns in your mysql table, for example, "Score", "Name" and "Image"...

    1. First, you must save into your database this information. You know how to do that... (else don't hesitate to ask...)

    2. Then, when user connects, your php file must return information with "echo" function. For example, to retrieve "score", your php file "SELECT Score FROM YourTable where USERNAME =$Username". And return this score with "echo".

    3. You have to do this operation with all your information BUT don't forget to separate all this data with a separator like " | " or " / " (or other string).

    4. Use ajax in Construct 2 to get all this data.

    So if score = 2 and username = Lima (in the database), Construct 2 retrieves " | 2 | Lima" (or other string if you choose another separator) from your php file after login...

    5. In your Construct 2, create two variables : "Score" and "Username" and use this events :

    6. Now you have all your data.

    NB : you can't register images in your database, you must upload your image to server and put the link into your database.

    Then use "Sprite : load from URL" action.

  • Hello,

    see this topic : construct-2-on-mac-osx_t61941

    and this website http://pixelles.ca/fr/blog/2014/09/inst ... -2-on-macs

    You have to use Windows Virtual Environment...

  • Hi, can you send your capx file please ?

  • Hi, see my reply on this topic :

    Don't hesitate to ask...

  • Yes, like you say : password needs be stored as encripted in database.

    For information, SHA512 algorithm is the best.. But the time taken to encrypt is longer than MD5 or other algorithm.

    Now let's explain how to do this.

    1. First, a person creates an account with username and password. Let's take for example, username : "Daniel" and password "Construct2".

    When this person click on the "Sign Up" button, you send this information to your php file.

    2. Your php file encypt your password with this function

    string hash ( string $algo , string $data [, bool $raw_output = false ] )[/code:2bbf67t1] 
    and registers this information into your database. (see more in [url=http://php.net/manual/fr/function.hash.php]php manual[/url])
    
    3. Now your account is created.
    
    4. The next time, when user wants login, he enter his password and his username. When he click on login button, your Construct2 app sends this information to your php file.
    
    5. Your php file (with sql language) retrieves from your database the encrypted password corresponding to the username.
    
    6. Your php file encrypts the password sent (when you click on login) and compares it to the registred password (retrieved in the step 5).
    
    7. If the encrypted passwords are equals, the user can connect, else the user can't login.
  • Hi, this zip file contain capx, snapshots and apks : https://www.dropbox.com/s/2h4fo19gp0ghzyj/Ajax.rar?dl=0

  • Hi, see this capx : https://www.dropbox.com/s/6qzr7wbucpf9h ... .capx?dl=0

    You can move the blue sprite (named care) with your mouse...

  • The ajax plugin works fine with Intel XDK. The problem is your local server. You can't use it from another device except your PC...

  • For more security, you can use this plugin to do ajax requests : plugin-ajax-rsa_t94880

    To hash pasword, you can use Kyatric plugin expressions. The plugin has lot of methods like you can see here : http://enjoycss.com/bg-img/custom/22725-ax2nzp.PNG

    You can use for example MD5 method. If your password is "construct2", you send to you php file "CBHash.MD5("Construct2")" then the php file check if this is equal to the password registred in database.

    Put you password in one of this expressions and you password will be hashed !

    I recomman you to read Kyatric tutorial to know mroe about hashing methods.

    Sorry for my bad english...

  • Hi,

    for encode you password, you can use Kyatric plugin : https://www.scirra.com/tutorials/50/cb- ... algorithms

    But if you want a secure login/Sign up system, i recommand for you this product : https://www.scirra.com/store/construct2 ... ystem-2257

  • Hi ,

    you can use the expression "choose".

    For example if you have the animations "default", "fly", and "run" ; you can use : SET ANIMATION TO - Choose("default","fly","run")...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi,

    Of course, when a person donwload the app from store, the permissions will be automaticly checked.

Saad Swad's avatar

Saad Swad

Member since 31 Dec, 2015

None one is following Saad Swad yet!

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies