Why does this not work like I think it should?

  • This is less "How do I...?" and more "Why does this...?" as I have a working solution, but my curiosity got the better of me. I've recently returned to C2 after about a year, and started working on my old idea again. I ran into the same wall I did before and wanted to tinker a bit while I learn the program better.

    Before I took a break, I asked around for help on making a Smooth Grid Movement for a player controlled sprite, found in this post. On returning, I dug it up and was curious about other ways to get the same function and wondered about tweaking the 8 Directional Movement behavior as I found more recent tutorials on Bullet movement used as a Grid Movement.

    The first one is a Custom Movement function for the sprite that moves it in a 32x32 grid format, which works. However, I'm not 100% sure why it works and was thinking there might be a simpler way to achieve the same function.

    The second capx uses 8 Direction movement instead of Custom (simply switched out) and while it moves, it doesn't stick to the 32x32 grid, let alone transition smoothly from one square to the next.

    Smooth Grid Movement 1.capx

    Smooth Grid Movement 2.capx

    Needless to say, the 8 Direction version doesn't work properly and I'm curious *why* it doesn't work. If anyone can shed some light, I would appreciate it very much.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I deleted this part and now it works.

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