dop2000's Forum Posts

  • Not sure what you mean. Of course it's possible to only have one child object.

    And you can choose which parameters will be synced with the parent - for example if you don't want to rotate the child with the parent, disable "Angle" checkbox.

  • You can increase the last parameter in lerp to 0.5-0.6 for sharper movement.

  • Check out this demo:

    howtoconstructdemos.com/coyote-jump-a-simple-trick-that-can-improve-your-platformer-game

    For the second part of the question - you can check if player is overlapping the floor at offset (for example Y+5) and allow making a jump by setting vector Y.

  • Touch speed may be very inconsistent. One tick it's 50 and another tick it's 5000. You should probably limit the maximum speed - min(Touch.SpeedAt(0), 1000)

    You can also try smoothing it with lerp.

    Variable charSpeed
    
    On every tick : Set charSpeed to lerp(charSpeed, min(Touch.SpeedAt(0), 1000), 0.3)
    
    
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Are you using multiple dictionary objects? Or one dictionary object with multiple instances? This will make it more difficult to export json file with the results.

    I suggest you use one dictionary and create unique key names for each level in it. For example:

    level1_restarts: 5
    level1_deaths: 4
    level2_restarts: 2
    level2_deaths: 1
    
  • Check out this demo:

    howtoconstructdemos.com/push-objects-in-tile-based-game-sokoban-style

    It also allows to push only one block, but maybe you'll find a way to change it for multiple blocks.

  • This should still work in C3. Please post a screenshot of your code.

  • You can use LineOfSight behavior on the player. Loop through all tiles and check if player has LOS to that tile. But if the tilemap is big and you are doing this on every tick, this event will slow the game down.

  • Functions are mostly used to avoid repeating the same code in multiple events. If you are only calling that function from one event, you don't need a function. Create a sub-event and pick the instances there.

  • I know that "for each" runs with every tick, thats why I created this thread in the first place. I looked for forum entries on how to use instances with events, but I could only find examples with "for each". Is there a specific tutorial that covers instances in events that you can point me to?

    Not just "for each", but all non-triggered top-level events run on every tick. (Triggered events have a green arrow in the icon, for example "On collision")

    And in most situations you don't need to use "for each" loop, you can pick instances without it.

    Like I said, check out the official templates. This is the best way to learn Construct.

  • You don't need "For each" in this case.

    Note, that this event will run on every tick (~60 times per second). If you have lots of instances and lots of event like this, it may be bad for performance.

    C3 comes with tons of templates and tutorials, I suggest studying a few of them. This should give you an idea of how events work.

  • Picking of instances is one of the most important concepts in Construct.

    There are lots of ways you can pick one or multiple instances. Most of object events do this, for example "Sprite is visible" will pick all visible instances. There are also several System events for more advanced picking.

    It seems like in your case the best option would be creating an instance variable ID on the button object. You can set manually ID values from 1 to 4 for buttons, and then you'll be able to pick by this variable:

    Button Compare Instance variable ID=2
    

    You can also pick by UID, but this is a bad practice. It may work for a quick prototyping, but I don't recommend doing this in a real project. Or you might end up with code like this.

  • I'm trying to think of something like checking which are the grid coordinates of my current location and then use set them when I enable the tile movement but I can't find such a thing

    Yes, this may work. If you have a tilemap, you can use Tilemap.snapX(player.x) and Tilemap.snapY(player.y) expressions to place the player to the center of the current tile.

    If this doesn't work, you can try MoveTo behavior instead of TileMovement. For example:

    On Left key pressed
    Player is Not moving
    .... Player Move To (self.x+50, self.y)