[Plugin]Board, Layout2Board [Behavior] Grid Move

1 favourites
From the Asset Store
Snap to visible grid - perfect solution for any game genre
  • Thank you rexrainbow I really appreciate your help. Just little suggestion. Is it possible to check "Board - For each cell of logic layer"?

    I guess up to now the condition "for each cell" checks all logic layers. Am I right?

    This would be a great feature to add another "for each cell" but where you can additionally specify the Logic Layer.

    Regards

    Andy

  • AndreasR

    "For each cell" will travel all logic X, Y of a board. For example, board size is 8x8, then "For each cell" will go through all these 8x8 cells.

    Logic layer in my board is called "logic Z", it could be a number or a string. For example, logic Z =0 is a based layer for tiles. Usually I will put chess on logic Z =1. So I use logic Z 0, 1 in this case.

    ( "For each cell" will not check logic Z, it only check all logic X,Y )

    I will add a "condition: For each LZ ( in a specific LXY )" later..

  • Update

    rex_board plugin: add "condition: for each LZ at LXY", "expression: CurLZ" to retrieve all LZ at a logic XY

    AndreasR

    Here it is.

  • Update

    rex_board plugin: add "condition: for each LZ at LXY", "expression: CurLZ" to retrieve all LZ at a logic XY

    AndreasR

    Here it is.

    You're awesome! Thank you so much for your great plugin support

  • Hi rexrainbow,

    I have been using a couple of your plugins (most notably the grid move and board ones) and they are fantastic! Thanks a bunch for coming up with all of them!

    I would like to know if there is a way to set an object to the board without having to create it first? Say for example if I have several instances of one object which I have already assigned to certain positions on the layout but I still want to use the grid move behaviour based on the board.

    Any help would be greatly appreciated!

    • StomachBug
  • StomachBug

    Uses "Action:Add chess" (rex_board plugin) to add chess into a board, it only set the logical position without changing the physical position.

    If you want to put a set of chess, you might see rex_layout2board plugin.

  • rexrainbow

    Hello;

    I have found trouble with the remove edges action in the edge plugin.

    Line 48 of the capx file I have attached below. It does not recognize it properly at startup.

    delete edges works.

    I appreciate your plugins, and thankyou for your time.

    yours

    winkr7

    https://www.dropbox.com/s/snro2cg997pmxmy/meg.capx?dl=0

  • Update

    rex_board_edge plugin: fix a name error

    winkr7

    Fixed, thanks for reporting this bug. Please update that plugin again.

    BTW, "action: remove edge" only removes the reference in rex_board_edge plugin, it will not destroy them, uses "action: destroy edge" to remove reference and destroy edge instances at the same time.

  • rexrainbow

    Thanks lots. It is working now.

    yours

    winkr7

  • StomachBug

    Uses "Action:Add chess" (rex_board plugin) to add chess into a board, it only set the logical position without changing the physical position.

    If you want to put a set of chess, you might see rex_layout2board plugin.

    Hi rexrainbow ,

    Thanks that worked a treat! Another thing I wondered is if it is possible to make the GridMove behaviour have a more 'snapping' like action?

    At the moment I am using a gamepad to control movement of an object but what is happening is too smooth a movement. Is there a way to have the motion behave so that even if the thumbstick is pressed in any given direction, the object will movement step by step instead of smoothly? For example like how objects move if you drag them around in the layout editor with the snap to grid active?

    Many Thanks

  • StomachBug

    Set the "MoveTo" to "No" in property table to disable the built-in moving in rex_grid_move behavior. Designer could maintain physical moving manually, like adding tween moving.

  • StomachBug

    Set the "MoveTo" to "No" in property table to disable the built-in moving in rex_grid_move behavior. Designer could maintain physical moving manually, like adding tween moving.

    rexrainbow

    Ok, so I have set "MoveTo" to "No" and am moving the object by (example) "Self.X - 32" much like what the chess piece does in your first Board tutorial but I may actually need to go back to using the MoveTo function for the physical object as well due to overlapping issues. I have a couple of questions based on the game I'm working on:

    Using GridMove, this can help prevent objects overlapping one another in the same space. A problem I have found is that if I make the size of an object different to what the Board tile size is then objects tend not to collide and easily move across one another. Is there a fix for this or am I using the behaviour wrong?

    Also do you know of a way by using the thumbstick on a gamepad to have an object move step by step instead of smoothly? Basically having the object move to the desired position, waiting a moment and then moving once more even while the thumbstick is towards any given position at any time?

    If you have the time to take a look at my capx it would be greatly appreciated.

    https://drive.google.com/open?id=0B3txcMQrB2eWWDY1dl9ScTNpcTg

    Thank for all your help!

  • Try Construct 3

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

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

    Setting the "MoveTo" to "No" only skips the physical moving, the logical moving still works.

    After calling Action:Move to neighbor/Action:Move to chess/Action:Move to LXY, the logical position will move to target logical position, then designer can get the responded physical position by ( Board.UID2PX(sprite.uid) , Board.UID2PY(sprite.uid) ). i.e. the chess moves

    from ( sprite.X, sprite.Y ) to ( Board.UID2PX(sprite.uid) , Board.UID2PY(sprite.uid) )

  • StomachBug

    Setting the "MoveTo" to "No" only skips the physical moving, the logical moving still works.

    After calling Action:Move to neighbor/Action:Move to chess/Action:Move to LXY, the logical position will move to target logical position, then designer can get the responded physical position by ( Board.UID2PX(sprite.uid) , Board.UID2PY(sprite.uid) ). i.e. the chess moves

    from ( sprite.X, sprite.Y ) to ( Board.UID2PX(sprite.uid) , Board.UID2PY(sprite.uid) )

    Thanks rexrainbow, I'll give it a try.

    Also should different sizes of objects on the board matter? I find that they continue to overlap when moving into one another instead of stopping movement. Is this right as when they are a uniform size they will stop moving.

    Thanks

  • StomachBug

    Cell size (width, height) defined in rex_squareTx or rex_hexTx is only have one kind of setting, it controls the position of chess in each logical position. Therefor you could set different size of each sprite object, it will not affect the board.

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