[Plugin] slg_movement

1 favourites
From the Asset Store
The I18N (Translation) is a Construct plugin created to translate text in game.
  • Hello again! I've been using your plugins for movement with good success so far. Been trying to make something based on your examples in the "test_slg_movement.capx" and have chess pieces moving around as they should without overlapping each other and all.

    I'm a bit stumped on how to make them interact with 'enemy' chess pieces however. You wrote something about using filters to pick enemies, but I guess I'm not quite advanced enough yet to completely understand how to use it.

    Mostly I'm looking for something that does:

    "Click enemy chess > move to enemy chess > do stuff."

    Any hints?

  • Vati-nyan

    It seems

    "Click enemy chess > move to enemy chess > do stuff."

    is not like

    "Using filter to pick enemy in a range"

    Do you mean that "move above enemy chess (overlap), then do something"?

  • Yeah, that would be it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Vati-nyan

    What's the rule of get enemy chess? Is it picked by slg_movement object?

  • You would select your own chesspiece, then (if able to reach it) click the enemy chess and select it that way, yes.

  • Vati-nyan

    Sound nice, what's the problem? Do you mean select the enemies in the range of 4 cells (for example)?

  • Hello Rexrainbow,

    My project is growing nicely with your great plugings (player chess can move & target easily, & enemies chess can target player chess).

    However, I can't find a way to make the enemy chess move toward a player chess (when it is the "enemy turn").

    Is there a command to make enemies "autoselect" the tile that would be closest to one of the player chess?

    As always, your help is greatly appreciated!

    Thanks

  • "make enemies "autoselect" the tile that would be closest to one of the player chess"

    The logic might be complex, just like player to select the moving target. "closest" is one of possible condition.

    Anyway, I will think about it when I have time.

  • Hello Rexrainbow,

    I have manage to circumvent a few issues with the enemy chess movement. It is now possible for an enemy chess to automatically select a tile nearby a player chess (it is done awkwardly, with some strange behavior but it work nonetheless).

    ---- SEE GROUP: "E_MOVE1" : (note: Only one enemy chess will move per turn)

    dropbox.com/s/t5u5awsbp74jpwr/SLGMOV_Test101.capx

    However, when the enemy chess is too far (i.e. the moveable area (tileframe = 1) is not within range of the player chess), the enemy chess can't move towards the player chess, and instead just run away to the left of the layout (I don't know why).

    Do take a look at my capx, maybe there could be a way to allow enemy chess that are too far from the player chess to select a tile (tileframe =1) that would be in the right direction, towards the player chess (i.e. so as to eventually be "within the moveable area" on a next turn).

    I hope this makes sense, do let me know what you think!

    Thanks, as always!

  • Get all of distance between move-able tiles and target tile, then pick the minimum one.

    I had not make a plugin for this, maybe someday.

  • Hi Rexrainbow,

    I'm glad to hear that this situation might bring even more great ideas for upcoming plugins.

    I understand your approach to solve this issue, but I can't translate it into C2 condition + action (unfortunately). I tried using the "compare two values + distance" under "system" but I seem to fail in selecting the right tiles.

    When you'll have a bit more free time, would you be able to point out how the condition+action should look like to deal with this situation? (i.e. Get all of distance between move-able tiles and target tile, then pick the minimum one. ). For example, would any this involve a specific usage of the SLGmovement (or can it all be done via "system + compare two values" + tile selections?).

    Thanks, as always!

  • Capx - pick nearest tile

    User need to update instance group plugin first, I had fixed a bug about sorting.

    Steps:

    1.Get move-able tiles.

    <img src="http://i1081.photobucket.com/albums/j352/rexrainbow1/moveabletiles_zps706f5d8a.png" border="0">

    2. sorting move-able tiles by function.

    <img src="http://i1081.photobucket.com/albums/j352/rexrainbow1/sorting_zpsfb150b84.png" border="0">

    Instance group plugin will pick two UID (expression:CmpUIDA, CmpUIDB) and ask which one "is bigger" through "condition:on sorting function". Put answer by "action:set compare result"

    3. the nearest tile is at the 1st item of "area" group.

    Here it is.

  • This seems very advanced and highly interesting!

    I am thankful for your help and explanation Rexrainbow (as such a list of conditions and actions would never have occured to me on my own).

    I will let you know how it goes once I integrate it into my capx (later this week).

    As always, if it works I'll be happy to share it so that everyone can gain from our exchange.

    Thanks!

  • Vati-nyan

    Sound nice, what's the problem? Do you mean select the enemies in the range of 4 cells (for example)?

    Hello again! Some things happened over easter that forced me to focus more on my main project again, so took a while... but I'm back at trying to make this work.

    My problem is mostly that movement based on your examples work nicely.But I also want to somehow be able to click an enemy chess within that movement range, have my chess move next to it, and then initiate combat.

    So I guess your example there is right, yes.

  • Approach target

    Demo

    • drag or arrow key to move black chess at blue tiles
    • green enemy will approach to black chess

    Capx

    Get shortest moving path from green chess to black chess. Then move to the first tile at moving path.

    <img src="http://i1081.photobucket.com/albums/j352/rexrainbow1/screen1-31_zps4586950c.png" border="0">

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