Individual Step Grid Movement

This forum is currently in read-only mode.
0 favourites
From the Asset Store
Snap to visible grid - perfect solution for any game genre
  • Okay, I'm not sure if this is an option, or not?

    I want it to be impossible to hold down the key and move continuously for pre-built grid movement... essentially I want individual step movement. For a grid-based system where every step has a possible event.

    Does such an option already exist, or do I have to kludge it?

  • 'Tis indeed possible, although it's semi-kludging. You should first set the movement to Manual instead of Player controlled. Then, make an event like

    Upon key UP ARROW pressed: move "Sprite" -2 vertically[/code:1atjayrp]
    
    ...And just do that for all the directions. When you hold the button down, you will still only move 1 space.  Remember to make it "upon key pressed" and not "key is down," otherwise you'll have the same problem you do now.
  • Finally got around to trying this, and it's not going to work... The movements are instant and not actual movement, and not constrained by solid objects anymore.

  • Oops, that's something I obviously overlooked. My bad; I'm pretty new to Construct so it was jumping the gun a bit to try and help someone. Sorry lol, I'll see if I can find another way around it.

  • No, I appreciate the input, and it's basically what I was looking for... I'll keep working on a solution.

  • Some time ago, I created a grid movement alternative, involving events and functions instead of behavior, and of course movement not teleport.

    Have a look at

    Maybe it helps.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Finally got around to trying this, and it's not going to work... The movements are instant and not actual movement, and not constrained by solid objects anymore.

    Just check for Solid with an Overlap at Offset before you issue the move action.

  • Just check for Solid with an Overlap at Offset before you issue the move action.

    Could you clarify on that? Every time I tried to check for overlapping Solid my cursor would just skip the solid objects or get stuck in them.

  • I too tried experimenting with what deadeye said, but I too have no idea what "overlapping at offset" means. Now I'm curious, 'cuz that could come in handy in the future.

  • I too tried experimenting with what deadeye said, but I too have no idea what "overlapping at offset" means. Now I'm curious, 'cuz that could come in handy in the future.

    It's a view to the future... no really, instead of checking for a current collision, you ask if there would be a collision, if you would move the object to that offset. You get the answer before really doing it, so you can decide to move the object or not.

  • Now I got it... Still wish I could make it actual movement instead of skipping along.

  • Tried this yet?

    Upon UP ARROW pressed: CustomMovement's Change Speed Toward Position

    Or theres a Change Speed Toward Direction..alot of change speeds actually. I haven't played with the Custom Movement behavior at all so not sure if that will work as I imagine but it should.

  • That changes the speed of the movement, but the movement doesn't actually work because there are no direct movement commands. Except for the move X at Y angle, which is an instant movement.

  • Playing with Custom Movement today, it was working as I thought it would, you set Change Speed to Position and the object moves toward that position (and past, though.)

    For moving a for moving in a grid, I suppose you would use some other object (invisible or maybe an X marks the spot graphic)..let it jump to the place like what you're getting already. Then have your character move to that graphic.

    Do you have a cap so I can see why it didn't work for you? You got me curious.

  • I attempted to do that, and that would be an ideal solution, except once again it ignores solidity of objects and so there is no easy way to create a boundary to stop the movement.

    I'm going to see if I can kludge together something with Overlap at Offset... but it seems odd that I have to... individual step isn't a terribly complex option. Just ignore repeated keypresses for gridmovement.

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