dop2000's Recent Forum Activity

  • Could you share your events sheet? AJAX doesn't require user input and should work on start of layout.

  • I'm pretty sure this is the right way to pass data to php. Those tutorials I posted above use the same procedure to write scores to the database.

    So either your sql table has a different structure, or you made some mistake in php or C2 events.

    Does it work if you hard-code the name into SELECT statement? Do you get that player's scores in C2?

  • Just change "50" to 60 or any value you need.

  • I believe it's a browser setting. In chrome click Settings -> Ask where to save each file before downloading

  • Rex has two plugins - one for local storage and one for web storage. There are also demo capx.

    I don't have much experience with it. See my capx in this post, it should give you the idea how to use this plugin:

  • Try this plugin:

  • These plugins may help:

  • You mean you need to pass a name from the list to php?

    I believe you do this by adding parameters to the URL, something like this:

    AJAX Request Url "https://myserver.com/GetScores.php?PlayerName=" & NamesList.SelectedText
    
    In PHP:
    
    $name=$_GET["PlayerName"];
    $sql="SELECT * FROM scores WHERE name='" . $name . "' LIMIT 3";
    ...
    [/code:3s3ngeez]
    
    I did this many years ago, so not sure if the syntax is correct.. 
    There may be issues with space character, maybe first try testing with one-word names.
    
    There are a few tutorials you can study:
    [url=https://www.scirra.com/tutorials/4839/creating-your-own-leaderboard-highscores-easy-and-free-php-mysql]https://www.scirra.com/tutorials/4839/c ... -php-mysql[/url]
    [url=https://www.scirra.com/tutorials/346/online-high-score-table-ajax-php-mysql]https://www.scirra.com/tutorials/346/on ... -php-mysql[/url]
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • For example your layout is 100.000px long and your screen size is 1024x768

    Make the first 1024px and the last 1024px of your layout look identical.

    Once the player.X>=(100000-1024/2), set its position to Player.X-(100000-1024)

  • Why can't you just pick instances of sprites B with low fuel?

    B fuel<10 -> B find path to yellow spot

    If you want to differentiate objects in the family, the easiest way is to add another instance variable objectType to the family. When sprites are created, for sprites A set objectType="A", for sprites B set objectType="B".

    Then you can do this:

    Family objectType="B" -> Family find path to yellow spot

    and Family fuel<10

  • For "y"=0 to array.width-1
       For "x"=1 to array.at(loopindex("y"))  -> system create sprite at ( loopindex("x")*50, (loopindex("y")+1)*50)
    [/code:eizhips2]
  • The first line in your php retrieves 100 top scores. If John Doe is not in the top 100, his score will not be shown.

    If you want to display first 100 plus John Doe, you need to first retrieve 100 top scores, and then get one or several highest scores for John Doe:

    SELECT * FROM scores WHERE name='John Doe' ORDER BY score DESC LIMIT 1[/code:vknipp8z]
    
    Or modify your SELECT statement, probably to something like this:
    [code:vknipp8z]SELECT....TOP 100 
    *UNION* 
    SELECT ... WHERE name='John Doe'...[/code:vknipp8z]
dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 257 followers

Connect with dop2000

Trophy Case

  • 8-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x13
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

28/44
How to earn trophies