[Plugin] slg_movement

1 favourites
From the Asset Store
The I18N (Translation) is a Construct plugin created to translate text in game.
  • Sethmaster

    Uh, I need some time to integrate this feature into my board system. I will try.

  • Sethmaster

    Uh, I need some time to integrate this feature into my board system. I will try.

    Thanks.

    Your plugins are great and a huge help in my endeavor to make TBS games

  • Sethmaster

    You might try to update the rex_squareTx plugin.

    Then set the "directions" to "8 directions" to search movable area and moving path with 8 directions.

  • Sethmaster

    You might try to update the rex_squareTx plugin.

    Then set the "directions" to "8 directions" to search movable area and moving path with 8 directions.

    Thanks. Will do so right away.

  • Update:

    Fix some code for changing the directions in rex_squareTx object.

  • Hi, rexrainbow, I have a question/feature request about slg_movement. I'm trying to create a moving path that goes around 'thin walls'. I don't know if this already possible.

    I've attached an image to try to explain what I mean.

    The top part of the image shows the behaviour that I'm suggesting, where you can define a 'wall' so that the moving path goes around neighbouring tiles depending on constraints.

    The bottom part of the attached image shows a suggested implementation which allows the user to limit, per tile, a direction where the chess piece is allowed to enter from.

    Thanks for reading.

    best,

    lernie.

  • faulknermano

    It migh be done by this board edge plugin.

    http://c2rexplugins.weebly.com/rex_board_edge.html

  • Update

    Add "Shuffle neighbors" property.

    If "Shuffle neighbors" in properties table sets to "Yes", the order of visited neighbors will be random, i.e. the order of visited nodes is not the same for each request.

    And here is another demo of using this plugin -

    Diffusion (Capx)

    • the blue tiles with "+" are energy source, each one could provide 50 units of energy, and it will diffuse energy to neighbors.
    • the red/blue tiles with "-" are energy consumption, each one will consume 10 units energy. Red is power off, blue is power on.
    • the red/blue tiles with nothing are energy pipe, each one will consume 1 unit energy. Red is no energy go through, blue is energy passing.
    • click an empty cell to create a pipe. click a pipe to remove it.
  • Update

    Support wrap board. It is better to update all my board series plugins.

    "Wrap" is set at the properties table of rex_board plugin. User could turn off this feature by set "Wrap" to "No".

  • Try Construct 3

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

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

    Sample capx

    "Action:Get moveable area" is using flood fill to find moveable area through "Condition:On cost". This feature also could be use for other propose, like picking neighbor chess/tile which have the same color in sample capx.

    The steps of picking are -

    1. Save target color in variable.

    2. Call "Action:Get moveable area", sets the parameter of moving point to 1.

    3. In "Condition:On cost", pick tile/chess instance by expression: TileUID, or ( expression: TileX, expression: TileY ), see Cost function section for more detail.

    4. Compare the color of picked instance with target color -- If the color of picked instance is matched to target color, return cost to 0 by "Action:Set cost". Otherwise do nothing, the cost will be BLOCKING by default.

    5. Finally, the matched tiles will be put into instance group by UID, then add the source tile into this group.

    iwontnamemyself

    xoros

  • rexrainbow - Is there a way to add a single chess to a group of a different color? In my game, I have power-ups that need to be triggered if they are next to a group of "the same color" and I think the easiest way to accomplish this is to include the power-up in the group it is next to.

  • rexrainbow - Is there a way to add a single chess to a group of a different color? In my game, I have power-ups that need to be triggered if they are next to a group of "the same color" and I think the easiest way to accomplish this is to include the power-up in the group it is next to.

    Uses "action add instances" in rex instance group plugin. The start instance of picking the same color is using the same way to add into group.

  • I actually tried that already, but it wasn't working. I'll try it again though.

  • I actually tried that already, but it wasn't working. I'll try it again though.

    Dump content of group by Expression:GroupToString. For example, use action:log in official browser object.

  • Update:

    See document in 1st post of this thread.

    Accumulated cost

    Sample capx

    "Expression:UID2PathCost" could be used to get accumulated cost from start tile to a specific chess/tile in moveable area or moving path after call "Action:Get moveable area" or "Action:Get moving path". Return (-1) if this specific chess/tile is not in the last scan of request.

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