dop2000's Forum Posts

  • And here is a tutorial, you can just copy the keyboard from it:

    construct.net/en/tutorials/mobile-keyboard-hall-fame-738

  • First of all, there is a much easier way to remove spaces from the beginning or end of the string - use trim(text) expression.

    Your loop never ends because you are not updating the TextInput text. You need to do this:

    TextInput set text to left(......)
    Task set text to TextInput.text
    

    And finally, I always add this condition to While loops, to prevent infinite loops:

    loopindex<1000

    So even if you created an infinite loop by accident, it will stop after 1000 iteration and will not freeze your browser.

  • You don't need to know JS. Simply add a script in your event with one line of code:

    runtime.callFunction(runtime.globalVars.funcName)

    , where funcName is the global variable containing the name of a function you want to call.

    One problem with this method is that it may not work if you choose advanced minification when exporting.

  • I have never seen this "Loops" section. I tried adding a few loops and recursive function calls in a test project and still don't see it in the debug view.

    Could you post a screenshot?

  • Well, you can try creating an object with dictionary key name, then checking if it belongs to the family. If not - delete it immediately.

    This may not be a good solution if you have lots of keys in the dictionary, which may match different object names.

  • So the dictionary may contain keys like "chicken", "banana" and "apple". But you only want to create objects from the family "Fruits", and avoid creating the chicken sprite?

    I'm afraid the only option is to make a list of all objects in the family. It may be a simple text variable with a comma-separated object names. Then you can use find() expression to check if the dictionary key is in this list.

  • Two ways -

    1. Use function maps, there is a template in C3 explaining how they work.

    2. Call the function from a script. For example - runtime.callFunction(runtime.globalVars.funcName)

    The second method if much easier.

  • That's why I asked you to share your project!

    If the events are at root level, they are executed on every tick. And if you are getting JSON data from a file or Internet, then it may not be ready during the first couple of ticks. And that's why the Else part is triggered.

  • You need to remove "Append JSON.Get("books.title") (i.e. line #3) for the "Else"-case (i.e. line #4) to fire.

    Nope, without this action it still works correctly for me. The Else event is not fired if the key exists in JSON.

    dropbox.com/s/2x9jtliyiud772n/JSON_HasKey.c3p

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • quackgyver Could you share a sample project or JSON string? I tested this just now and it works correctly - only one event fires.

  • Solid behavior doesn't prevent collisions between solid objects. It's supposed to be used with other behaviors like 8direction, Bullet, Platform, Car etc.

    So you need to add one of those behaviors to the cursor sprite and move it with the behavior towards mouse position. I suggest using behavior actions for movement, for example "Set vector", because if you set sprite x/y coordinated directly, collisions with solids may not work properly.

    I would try Bullet first - On every tick set bullet angle of motion to angle(self.x, self.y, Mouse.x, Mouse.y)

    .

    Another approach is Physics. Check this demo:

    howtoconstructdemos.com/physics-ball-attracted-to-mouse-cursor-capx

  • You can export to Cordova and either build with Android Studio or Cordova CLI. You will be able to make changes to the manifest file.

    Another solution is to resize the window in your game when keyboard is open. Check out this thread:

    construct.net/en/forum/construct-3/how-do-i-8/stop-androids-on-screen-153087

  • As far as I know, file chooser doesn't work on mobile.

  • There is a Pinball template in the beta version of C3, have you seen it?

    https://editor.construct.net/#open=pinball

    Although it uses a different method for paddles/flippers.

    You can try "Set stepping iterations" action with different values, it may help to increase joints strength.

    Or you can set paddles immovable when they are in the lowered position.

  • DiegoM Thanks for these changes, they are super helpful!

    Will it be possible to export/import animations with image points and collision polygons data? Currently if we need to move an animation from one sprite to another, we have to replicate all image points and polygons manually and this can be a lot of work.