[Plugin]Board, Layout2Board [Behavior] Grid Move

  • Hey Rex, I download "pushbox.capx" and "grid_move_collide.capx" and all necessary plugins for this...And when I go play games I get this error.

    The problem is in GridMove behavior. Because when I delete GridMove in Event sheet then no error. When I set command: Chess GridMove move to Up I get error.

    This is error...

    Please help!!

    s9.postimg.org/m8sfj1zen/Untitled.png

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Dasa

    Please update Construct2 editor to latest version (r126+).

  • rexrainbow

    I've tried several things but would like to ask you or others if there is a good way to do something.

    According to your fall down example I created the loop and everything works fine. But I noticed that while using this implementation the logical position of the chess is immediately the end position.

    So for example a chess falls down and moves slowly, so it is not on the bottom of the board after 1 second. Nevertheless the logical position of this chess is already at the bottom.

    I tried several thing a.o. ?on hit target conditions? like used in the SLG movement moving path examples. However it still does not work the way I would like it to do.

    Could you please give me a hint how to create a chess falling down at any speed and have a matching logical position according to its actual physical position?

    Thanks

  • Thanks Rex....Yes, I update and work fine...

  • Raziel

    Yes, in my test capx, I will wait all chess fall down to their target physical position, then do next match.

    To wait all chess fall down, I use wait event + "on hit target conditions".

  • rexrainbow

    Thank you rex! Amazing work you do for this community!

    I've a probably stupid question:

    What is the difference between creating the x,y loop and picking the chess while it can move down and simply create "GridMove can move to" as a condition? Both works but I assume there are differences?

  • Raziel

    The logic is -

    The chess are falling from top to buttom, so checking chess from bottom to top (see the y-index) . If the chess could fall down, pull it down, ...until it can not fall down.

    Or you could just use grid move repeat to replace "while it can fall down".

  • Hi, I'm new to construct 2 and I tried your layout2board-Example but had a problem with the "move to target"-Action.

    I want to learn how to create a turnbased-grid-movement-Game.

    So I used your example with the black Chess-Tile and the blue Tiles as underground.

    1. I created an Enemy-Tile as a clone of the chess-tile.

    2. I put Chess and Enemy on a second layer

    3. I insert the Event:

    Every 1.0 Second -> Enemy move to target Chess.

    But it won't move ... ,____,

    If I use wander it works fine, but it won't work with the move to target-Action ...

    Can you tell me what I did wrong please?

  • KLRG

    I'm not sure, could you provide me a simple test capx?

  • KLRG

    Uh, the enemy could not move to (logic X of Chess, logic Y of Chess) if they are at the same Z index. They are in the same logic space.

    You could set the enemy to Z=2. And the logic X of Chess could be got by expression:Board.PXY2LX(Chess.X, Chess.Y). logic Y of chess is expression:Board.PXY2LY(Chess.X, Chess.Y)

    Here is the modified capx

    The enemy will move to Chess directly.

  • I can't open it, because it said something about a newer Version 130, but I just have 126. But I don't know how to update it. There is no update in Steam or something like that ...

  • KLRG

    r131, the latest released.

  • Thanks. Now it works.

    By the way. Is there a way to let the enemy walk only 1 step per second? I want him to move to me with one step per second.

  • KLRG

    You need assign the moveing direction like the moving of black Chess.

    You could use slg movement plugin to find path, then move it.

    Or assign the moveing direction by other logic. I had not made action for this logic ("moving closely" or "run away").

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