dop2000's Forum Posts

  • The proper way is to parse it to JSON object, and then use int(JSON.Get("m_Int"))

    See JSON template in C3, it shows how to load and work with JSON data.

  • You should use "System compare two values" condition:

    While
    (LastPick=-1 | (CurrentPick=LastPick & CurrentPick=RandomPick & LastPick=CurrentPick)) equals 1
    

    You may need to change the parentheses.

    .

    Another way of doing this, when you have a mix of different conditions is with a local boolean variable:

    .

  • Change the collision polygon in the sprite.

    Ignore the warning saying that the polygon has too many points, you can add 20-30 points if needed.

  • No, activating a parent group does not automatically activate deactivated subgroups. There must be some other event in your code that's doing this.

  • You can simply move Drawing Canvas in front of the Player on every tick.

  • You disabled collisions for "dirt" tiles 0 and 1. So when a dirt chunk is created, it essentially has no collision polygon, that's why your overlapping checks don't work, and all dirt chunks get covered with rock chunks. But what's worse is that your rock chunks have very few rocks (the only tile that has collisions), so they in turn also get covered by many more chunks...

    If you just want to fill the area with tilemaps, what you are doing is a weird and extremely ineffective method. All you need is one loop:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can use a small DrawingCanvas (say, 2x2 pixels). When an object is touched, place DrawingCanvas in this position, paste the object, save snapshot, then read RGB values from the snapshot.

  • You don't need Pick all, For Each and Pick by comparison in this case. You can change your events like this:

    If it still doesn't work as it supposed to, try changing it to "Every 2 seconds", leave just one instance of the AnEnJetBot and run your project in Debug Mode. Hit pause, inspect all instance variables, resume, pause again after 2 seconds, check variables again.

    Once you fix it for one instance, you can try with multiple instances.

  • Check that the collision polygon and Origin image point are exactly the same in all frames and in all animations. If you have many animations, it's better to use a separate rectangular sprite with 8-direction, and pin your player to it.

    If this doesn't fix the issue, please post your project file.

    EDIT: Sorry, just noticed that you've already checked the polygons and image points. To be completely sure, try disabling the walking animation.

    Do you have any other behaviors on the player, or are you changing any of its properties like angle/position with events?

  • Here is an example:

    But every game is different, you may need a different set of events.

  • I gave it a try:

    dropbox.com/s/1996k09wn6j8oy8/MobileKeyboardTest.c3p

    Seems to work, but only in Scale Outer mode, and may require more work for proper scrolling etc.

  • It looks like there is no easy way to do it with scripting. You can get mouse position, but you'll need to test all object instances if they are overlapping this position. And with different collision polygons in sprites, this may be a very difficult task. Edit: not that difficult, as Mikal pointed out, there is containsPoint(x, y) method.

  • For Destination Out blend mode to work, both the block and the player need to be on the same layer, and the block needs to be above the player. However, since you have other objects (tree), which can be above or below the player, the block will also erase parts of the trees which are below.

    You probably need three layers - layer 1 for trees below, layer 2 for player+block, and layer 3 for trees above. Move trees between layers 1 and 3, don't change player's z-order.

    There may be other solutions, depending on your game. For example, when the player starts digging, use DrawingCanvas - paste player sprite on it and erase the bottom part.

  • I haven't tried it, but you can zoom-in the layout when keyboard is open, and zoom-out, when it closes. For example, save ViewportHeight on start of the layout in a variable. And then when it suddenly becomes much smaller, you can assume that the keyboard is on the screen, so you can change layout scale to (OldViewportHeight/NewViewportHeight).