rexrainbow's Forum Posts

  • Update:

    Support reading "object layer", see this post for more detail.

  • 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.

  • 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.

  • Update:

    [Plugin] Board

    • Add condition & action "Pick chess at Logic X,Y", "Pick chess above tile", "Pick chess above tile UID" to pick chess into SOL above tile.

    Note: "Pick chess above tile" only pick chess above "one" tile.

    "Pick chess above tile UID" could help user pick chess instance in

    slg_movement, and Matcher plugin since they all provide expression:TileUID.

  • Angel

    Uh, "rex_grid_move" is a "behavior", you should put it into "behaviors" folder.

  • Ashely

    Is this

    objtype.applySolToContainer();

    correct to do container maintain?

  • 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!

  • Update:

    Fix a small bug. Thanks for aktarus

  • 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">

  • Try Construct 3

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

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

    Yes, the "expression:TileUID" only index to tile (z=0 on board object). But user could use the tile uid to pick the chess standing on this tile. (Actually, there two expression -- "expression:TileX", "expression:TileY" which might help user to get chess more easily. For example, get chess uid by "expression:XYZ2UID(TileX, TileY, 1)" )

    Or user could save the symbol at instance variable of tile instance when moving chess.

    "Tile" (z=0) is just a base line -- each chess need to stand on a tile (z=0).

  • RandomPlus by cow_trix

  • I would like to make another version of sprite bank for board system (might be named chess bank), but still have not enough time.

    Does any one use sprite bank to save chess(sprite instances) on board plugin?

  • boolean

    C2 engine stores instance variables in a list.

    It is hard to keep compatible if user add or change the order of instance variables.

    For example:

    Save the instance variables

    x: 10
    y: 20

    to JSON will be

    "[10, 20]"

    Now user insert another instance variable

    i: 3
    x: 10
    y: 20

    The JSON should be "[3, 10, 20]".

    or

    x: 10
    i: 3
    y: 20

    -> "[10, 3, 20]"

    Any suggestion for these situation?

  • Update:

    Add "condition:On each object", "expression:ObjGroupName", "expression:ObjGroupWidth" , "expression:ObjGroupHeight", "expression:ObjectName" , "expression:ObjectType", "expression:ObjectWidth" , "expression:ObjectHeight", "expression:ObjectX" , "expression:ObjectY", "expression:ObjectProp" to read "object layer" into event sheet.

    "condition:On each object" will be triggered when executing "action:Create tiles", or "action:Retrieve tile array" for each object. Then use these expressions to get information of (each) object.

    Capx

    Here it is.

  • Work in progress. I had read "object" into plugin.

    Now I need to add a condition and some expressions to fetch information at event sheet.

    BTW. The "object" could be a "trigger area". It might be a useful things in my board system. I would like to create an "area" plugin to handle the logical "trigger area".