dop2000's Forum Posts

  • 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]
  • I believe it's not possible with just one boolean instance variable and nothing else.

  • kriand

    "every 0.1 seconds" is not much better than every tick in this case. Before using "acquire target" you need to check that this turret does not have any targets already. Or simply use "Add object as target" once and the turret will acquire them automatically.

  • kriand , What is "2"? Did you mean setting animation frame to 2? But this will skip frame 1.

    DarthPapalo666

    If your animation is not looping, you can make this event with 3 conditions, it will only be triggerred once:

    Sprite On animation frame change

    Sprite Animation frame =0

    Sprite is animation "Name" playing