[Plugin]Board, Layout2Board [Behavior] Grid Move

  • This is another way to pick an empty cell. It's more flexible,

    User need to update rex_board plugin and rex_chess behavior first. I will re-wrote the document of rex_chess behavior later.

  • rexrainbow

    I am encountering a bug.

    Dont know why, but maybe u understand and are able to fix it.

    I hope so.

  • Savvy001

    Try to update board plugin.

    Updating all board series plugins is more better.

  • Thanx rexrainbow

    That solve the issue.

  • Update:

    Grid move behavior - recycle some objects while creating, it "might" enhance performance.

  • Hello! I return to bother you once more with questions!

    I have a square on the board, a so-called "settlement", that I want to be able to use to create more units in the game. When asked to add another unit/chess I want it to place it either on the square itself, or next to it, if the square is already occupied. So far I am able to place the chess on the square, but when it is occupied I get the error when a space already has a chess in place - I can't make it go on to place it on the next tile instead.

    Here is my code that I've experimented with so far, and which doesn't seem to work:

    Basically I want it to check if tile is empty? If so: place chess. If not: check if next tile in row is empty and place chess.

  • Vati-nyan

    What is "settlement.X, settlement.Y"? It looks like a physics position.

    Most of board action/expression/condition are using logical X/Y/Z.

  • Those are the positions of the square that I either what the chess placed, or next to. It's like a base that produces these chess.

  • Vati-nyan

    Ok~ but it is a physics position, i.e. position in pixels. Not a logical position, i.e, the index on the board. You might try to use logical position in board's ACE.

    You could put chess behavior, then get logical position by chess.LX . chess.LY .

  • I think I understand what you mean, I need to use the X/Y numbers of the actual tile to put it on? Instead pf pixel positions.

    I still don't entirely grasp how to do it in practice though, and how to make it move on to the next tile if the first one is occupied. Could you give a clearer example?

  • Vati-nyan

    What's the logic of "picking the next tile"? Sorry, I did not get your problem.

    My suggestion is, using "board condition:Is empty" to check the cell is empty or not. Change the logic XY to next cell until find an empty one.

  • I tested all your board plugins! That looks fantastic.

    now i have to draw a Staggered Isometric map but square Tx plugin only support the normal diamond isomaps. Please is there an alternative or workaround for that.

    Thanks

  • jiloogle

    Well... I will try.

  • Update

    SquareTx plugin: support "Staggered" map. Select it at "Orientation" in properties table.

    jiloogle

    Try it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • work like a charm thank you rexrainbow

    In the Attached repro.capx i got:

    this.layout_mode is undefined in Rex_SLGSquareTx_plugin.js, line 225 (col undefined).

    to fix it i changed that line from:

    		else if (this.layout_mode == 2)  // Staggered[/code:1kvvyaly]
     to :
    [code:1kvvyaly]		else   // Staggered[/code:1kvvyaly]
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)