[Plugin] slg_movement

  • Cool, thanks!

  • Uh, I forget to say: user should update instance group.

  • Hello <img src="smileys/smiley2.gif" border="0" align="middle" /> ,

    when I test test_slg_movement.capx, there is an error after the movement when I select the chess for a second time.

    Here is the message:

    "Javascript error!

    ReferenceError: assignment to undeclared variable key

    localhost/Rex_gInstGroup_plugin.js, line 546 (col undefined)"

    Could you help me please?

    Thanks

    PS: Sorry I don't speak english very well

  • aktarus

    Thanks, I had fix the bug. Please download instnce group plugin again.

    PS. My english is not good enough. <img src="smileys/smiley9.gif" border="0" align="middle">

  • I add another sample capx --

    Filter + Cost Function

    Combine previous sample capxs

    • Filter (event 10): the move-able area of black chess are the tiles which has no chess standing on it.
    • Cost function (event 13): the black chess can not move cross "enemy" (the dark yellow chess), it will affect the move-able area, too.

    Have fun!

  • rexrainbow

    Excellent! You are our hero!

    It works like a charm now.

    <img src="smileys/smiley4.gif" border="0" align="middle" />

    Thanks a lot

    ps: I saw your last post. Incredible! You never sleep!!

  • I had added some conditions for picking chess like "Pick chess above tile UID" in board plugin, so that user could get chess instance more easily in cost function/filter function, just passing Movement.TileUID to get chess.

  • Another sample capx --

    Pick enemies

    Filter function in "move-able area" could get attack-able (in this capx, the attack range is 2 (tiles)) enemy instances.

    Just put target chess.uid at "action:Append filter result". Then pick chess from instance group after doing "action:Get moveable area".

    More over, user could pick target chess with more conditions like checking the HP (saved in instance variables) , or something else.

    PS. user need to update board plugin to open this sample capx.

  • The example capx's just seem to open a page of garbled text for me?

    Apart from that, this seems to be just what I needed! I'll go try it out right away.

  • Vati-nyan

    Right click the link, download file by "save as..." (I guess)

    I don't know why the browser treat capx file as a text file.

  • An isometric map example

    Demo

    • click or touch any green tile

    Capx

    The direction is -

    0: right
    1: down
    2: left
    3: up
  • Ah I see, thanks!

  • Hello Rexrainbow,

    I must begin by thanking you for creating such great work of art (in the form of plugins and behaviors!).

    I am encountering some problems when trying to integrate your previous capx examples into a turn-based strategy game (i.e. movement seems good but I can't select/pick enemies).

    I would like to know if you could be so kind as to review my capx and see where I am making any mistakes.

    For everyone, please do take a look into my capx as well and if there is anything you like in this humble "1st try", do feel free to take it and share it around! :)

    dropbox.com/s/ki3fu87az693l3s/Test101.capx

    Thanks!

  • To get enemies in a range, you might reference this capx

    The description ("Pick enemies") is at first post of this thread.

    Shortly, it uses "filter function" to get enemies which stand on tiles in a range.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello Rexrainbow,

    I have indeed used your referenced capx and it works perfectly on its own. The issue comes when I try to integrate it with the slg_movement plugin.

    I seem to run into selection problems when trying to make the "pick" as I do not use the same single chess piece (with GV) for both player,partner,enemies (as you do in your capx example).

    I will try to find a way to make it work, but if you or anyone else has any idea where I go wrong, please do let me know; it would be highly appreciated (and surely useful for anyone else as well).

    Thank you very much!

    dropbox.com/s/ki3fu87az693l3s/Test101.capx

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