0 Favourites

How do I position and Grid move

  • Hi

    i know there are plugins (which i cannot get to work)

    help needed

    to randomly position a sprite on a tile map

    turn based movement snapping to grid

    so lets say goblin moves towards hero on a tile map background it can move two tiles per turn

    I am really struggling with grid movement within C2 or finding a location which puts them in the middle of a 32x32 square

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • do you already know how to use "lerp" for the movement itself?

    For moving 1 tile on the x-axis, you only have to move the sprite by 32x1 pixels.

    Example 1: sprite1.x = sprite1.x+(32)

    For moving 2 tiles on the x-axis, you only have to move the sprite by 32x2 pixels.

    Example 2: sprite1.x = sprite1.x+(32*2)

  • do you already know how to use "lerp" for the movement itself?

    For moving 1 tile on the x-axis, you only have to move the sprite by 32x1 pixels.

    Example 1: sprite1.x = sprite1.x+(32)

    For moving 2 tiles on the x-axis, you only have to move the sprite by 32x2 pixels.

    Example 2: sprite1.x = sprite1.x+(32*2)

    thanks after just testing some things this is really useful

    then i found snapx on tilemap manual stuff and answered my own random placement question

    you sir have just answered my movement problem many thanks, very straightforward

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