dop2000's Forum Posts

  • 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.

  • I found an old C2 project, here is how drawing it's done there:

    You can use DrawingCanvas instead of Paster.

    The important part here is that you move Brush sprite to the new mouse position, and then stretch the BrushFill sprite from the previous brush position (FollowBrush) to the current position (Brush). This allows to draw lines without gaps.

  • Can you try sending data from the current project to the spreadsheet used in your previous game (the one that's working)? If you are able to send data, then the issue is likely with the new spreadsheet/script. Maybe you missed a step and didn't grant some permission.

  • Or you can do this without functions. Just repeat the code which is inside the "AddToDictionary" function twice - for TextInput1 and TextInput2

  • In C2 you need to add Function object.

    And use Function.Param(0) instead of "t"

    construct.net/en/construct-2/manuals/construct-2/plugin-reference/function

  • You can make the capx yourself, just open the project in Construct 3 and replicate everything in Construct 2.