dop2000's Forum Posts

  • luckyrawatlucky I posted a new version where you can move pieces with mouse:

    howtoconstructdemos.com/chess-game

  • Happy New Year everyone!

    There are a few new demo projects on HowToConstructDemos.com:

    LINK Tilting platform (seesaw) in a platformer game

    LINK Simple camera scrolling in a top-down view game

    LINK Chess game for two players! This is an implementation of chess.js library, which supports chess move generation/validation, piece placement/movement, and check/checkmate/stalemate detection - everything but the AI.

    LINK Physics ragdoll (paid)

  • robit_studios You can simply generate a sequence of random numbers in advance and store it in an array. Say, generate 10K numbers. Then your "seed" will be an offset position, starting from which you'll read numbers from the array.

  • If I understand your problem correctly, Mouse.X and Mouse.Y coordinates don't work when your screen starts scrolling, is this right?

    If you have layers with different parallax, use Mouse.X(layer) and Mouse.Y(layer) to get cursor position for a specific layer.

  • Unfortunately, there is no C3 version of this addon.

    I'm not sure what tag filters are you referring to. If the line needs to be in Physics world, then you should avoid using other behaviors like Pin or Solid.

  • You need to somehow create rigid joints between all pieces of the line. I tried to do it with physics (created joints in triangles, used an invisible block to join to), but nothing worked. The line was not rigid and easily broke when collided with an inmovable object.

    I managed to do this only with Box2d+ addon in Construct 2

  • Pretty much the same. But if these dangerous tiles are solid (player walks on top of them), you need to pick the tile which is below the player, so use something like ... PositionToTileY(Player.Y+10)

  • It's not a bug, it's just a different representation of the same data.

  • Yeah, it's confusing that arrays are shown differently. X axis is displayed horizontally in the array editor and vertically in Debug.

  • It may be easier to temporarily disable the object - disable collisions and make it invisible for 10 seconds. Or move it off-screen for 10 seconds, then move back.

    Because 10 seconds is a long period of time, I recommend using Timer behavior instead of "Wait 10 seconds". With Timer you'll have better control - you could pause or cancel the timer if needed.

    So your code might look like this:

  • I made a little demo for you:

    dropbox.com/s/5jd5tsswomp8d1h/TilemapDangerousTiles.c3p

    All mushroom tiles are dangerous. As you step on them, you die.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It is not possible to add instance variables to individual tiles. There are several other ways you can achieve this.

    1. You can create another tilemap with the same size. In this tilemap define only a few tiles - for example, tile #1 red which will mean dangerous, tile #2 green is walkable, tile #3 blue is water etc. Make this tilemap invisible and place it on top of your main tilemap.

    When player is moving, check tile number under the player on this second tilemap. If tile id is 1, then kill the player.

    2. If you have many dangerous tile types (spikes/lava/swamp), add their IDs into an array "DangerousTilesArray". When player steps on a tile, check if this tile ID is in the array, then kill the player. You can create similar arrays for other types of tiles, for example "TreasureTiles", "SlowdownTiles".

    3. Similar to previous method, but instead of arrays you can use text global variables. Simply create a variable with the list of tiles:

    Variable DangerousTilesList=,5,99,131,183,200,

    Then check if tile ID is in this list using find() expression.

  • 1.

    Array Set value at 2 to 12909090

    2.

    If you want to calculate the total again, you need to reset the variable to 0 first.

  • 1. I don't understand the problem. If you know the index you want to change, then simply do "Array set value at index ..."

    2. You need to run "Array for each element" loop and add all values to a variable.

    Array for each element
     Add Array.CurValue to TotalVar