jsutton's Forum Posts

  • PHP calls are a pain. If your file is called GET.php and you call Get.php it will not work. Which is why I suggested making certain the php file is working before wasting any more time on the construct side.

    (on line 11 you have [and], which if I'm not wrong has to be [AND]...it's little stuff that always gives me fits.

    Good Luck!

  • If I may suggest some troubleshooting things you can do:

    1. In a browser, run the ajax call in the URL line (https://site.com/file.php?username=xyz&password=123 [this assumes the user/pwd exist]

    and just make sure it is giving a return (ie, the php file is working properly)

    [If the php file runs, at least you know that part is correct and can move on with debugging.]

    2. If the php file is working, preview your project in a browser and pull up the browser debugger (developer tools). See if the project is throwing an error.

    If I had to guess right now...your php file is tossing an error on line 11

    You might also check your server to see if there is an error report.

  • You could try and make some artwork (I use Gimp because it's free and has a pretty small learning curve, but blender might be more to your liking...also free) to create the feel of a ball rolling. Import the frames into and animation, set your speed.

    I typically use 9 animations, 6 frames each, 0,45,90,135, etc.

    Then use the angle of the ball's movement to set the animation in real time.

    I've done a few things like this, and it can look pretty realistic.

    I do find it easier to have an object that moves and rotates that is invisible. Then pin the animation to that object. That way the animation doesn't rotate, but you can easily get the angle of the sprite that does. Makes it a lot easier to set the animations. (just MO)

  • If it's just a couple buttons it'll be minimal rendering to keep them around. (technically you could destroy and recreate each time)

    I'd probably just move the buttons off screen when you make them invisible and then move whichever one you need when you make it's layer visible.

    You can check the FPS and CPU profiler (debug preview), but it likely will not affect performance in any noticeable way.

  • I'm not sure what it is you are asking, can you try and explain your question?

    You might look at the browser plugin, or if you have a website you can set the button to open new tab?

    Best I can offer with limited info.

  • If this is data you want as the developer:

    The only reliable way I would know is to use a mysql database and collect the data for you to manipulate.

    There is a high-score tutorial that gives a good introduction to how to store data in a database. (AJAX, MYSQL, PHP)

    If it's just for the user, you could just store a variable in local storage.

    construct.net/en/tutorials/tracking-users-ajax-php-mysql-1061

  • There are a few ways.

    You could give them all a variable, and use it for the pick condition.

    Use a pick criteria, is visible.

    Move the ones not being used off screen when not visible.

    (probably a million more ways, but one of those should work)

  • I filed a bug report.

    Appreciate you looking at it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Not sure if this is a bug or me not knowing how to use right(text.text,count) properly.

    New project

    add keyboard, a textinput, and a text

    TextInput On Text changed, set text to right(textinput.text,20)

    Preview

    Type "This should work correctly"

    Up to the 10th character it displays as I would assume is correct.

    Character 11 thru 19 it starts dropping a character.

    At "This should work co" the text only displays "o" (the 19th letter)

    At 20 letters it starts displaying what I assume is correct..

    Bug or am I doing something wrong?

  • You do not have permission to view this post

  • probably need more specifics (do you want the sprite to instantly follow, lag behind, go to via a pathfind, line of site etc. etc.?)

    If you want the sprite to instantly follow, simplest way I would know.

    Sprite: Add instance variable "touch" as a number.

    On mouse left click, set sprite.touch = 1

    Condition: Every tick

    Condition: Sprite.touch = 1

    Action: Set sprite position: mouse.x, mouse.y

    On mouse right click, set sprite.touch = 0

    (the basic idea anyway)

  • Just a housekeeping question.

    Scenario: condition,

    set global global variable to 1

    wait 0

    set array.at(variable,0) to xyz

    The wait is needed or the global variable will not be changed before the set array and will use 0,0 (or whatever was in the global variable prior to the action)

    It looks like a local variable doesn't require a wait.

    Is this you ya'll see it and/or is there a better way? (I can put the set array in a sub-block and it doesn't need a wait 0 either.)

    Thanks in advance.

  • Best I know the multiplayer will not work on android, it gives a cross platform error simalar to the "allow origin" issue with ajax via php.

    Have you looked at the Photon plugin for C3? You can get a free account for limited use.

    construct.net/en/make-games/addons/534/photon-engine-c3

    photonengine.com/en-US/Photon

    Photon does work on Android