Issues with TileMovement

0 favourites
  • 4 posts
  • I'm very new and trying to make my first "game" with Construct.

    However, I've run into some odd issues using TileMovement for the player.

    First, when player spawns on the first playable screen, the player sprite runs off on its own and only stops when it hits a solid tile.

    In trying to fix it, I did find that I was spawning the player on the wrong layer. However, changing it to the correct layer only seemed to change the direction it runs off in.

    I'm using "default controls," so there's no "Simulate Movement" involved here. All I do on the first screen is spawn the player using a spawner object (Set Player Position PlayerSpawner.X, PlayerSpawner.Y).

    This only happens on the first screen. Moving to a new layout does not cause this issue.

    Also, the issue doesn't happen if I switch to 8-Direction Movement.

    Oh, and if I place the player manually, the issue doesn't seem to trigger.

    The second problem I'm having is that collisions seem to be way to sensitive. I'm moving to new layouts using an "exit tile" but placing the player spawner on an adjacent tile causes the game to start looping between layouts.

    Does anyone have any ideas of advice?

    Thank you.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • While playing around, I found a clue. For some reason, after spawning, the player object is trying to run back to its previous position.

    ...Why?

  • You have to change the objects gridx, gridy if you are using tilemovement. So if you change its x position and y position while you have the tilemovement active its going to move it back to the tile it is supposed to be on.

    To fix this you can temporarily turn off tilemovement while you change its x/y and then turn it back on

  • Thank you very much for your reply.

    Unfortunately, as soon as I re-enable Tile Movement, my player object runs off again.

    I also can't seem to find a way to get the "player spawner" object's GridX and GridY (even after giving it Tile Movement as well).

    All that said, I think I found the solution I probably should've been using all along anyway: having the "player spawner" object actually spawn the player instead of using Set Position.

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