How do I clear Target of the Tile Movement?

  • Hi everyone,

    is there a way to clear the target of a Tile Movement Sprite?

    For example, I would like to "teleport" the sprite to a new position but after the teleportation, the sprite tries to reach the tile movement target before stopping if the target is on the same axis and reachable.

    I tried to enable/disable the behaviour, put the speed at 0, I can't fix it.

    I understand that the sprite tries to reach the grid cell it was supposed to get but can we avoid it,

    even if the Sprite is perfectly placed on the grid after the teleportation.

  • It works for me. If I do "Set grid position (instant)", the character sprite teleports and stops, does not continue previous movement.

  • Thanks dop2000

    I tried to use Set grid position (instant) but how do you manage to teleport the sprite at the position of the Touch X, Y ?

    At the moment, it's always the same position.

    I have tiles that cover the grid and I thought by using the set position to the tile it could have work but nope :(

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Set grid position to:

    MyTilemap.PositionToTileX(Touch.X)

    MyTilemap.PositionToTileY(Touch.Y)

    (instant)

  • Yeahhhh I found thank you :)

    I created 2 variables to get the GridX and GridY that I apply with Set grid position (instant)

    Thank you again to help me to get back on the track

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)