[Plugin] slg_movement

Post your completed addons to share with the community

Post » Fri Jul 18, 2014 5:57 am

Update:

Fix some code for changing the directions in rex_squareTx object.
B
97
S
22
G
178
Posts: 4,122
Reputation: 104,051

Post » Sun Sep 21, 2014 8:07 am

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.
You do not have the required permissions to view the files attached to this post.
B
11
S
2
Posts: 18
Reputation: 557

Post » Sun Sep 21, 2014 11:48 am

@faulknermano

It migh be done by this board edge plugin.
http://c2rexplugins.weebly.com/rex_board_edge.html
B
97
S
22
G
178
Posts: 4,122
Reputation: 104,051

Post » Fri Sep 26, 2014 8:11 am

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.
B
97
S
22
G
178
Posts: 4,122
Reputation: 104,051

Post » Fri Oct 10, 2014 7:39 am

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".
B
97
S
22
G
178
Posts: 4,122
Reputation: 104,051

Post » Thu Oct 23, 2014 3:37 am

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.
Image
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
B
97
S
22
G
178
Posts: 4,122
Reputation: 104,051

Post » Tue Nov 11, 2014 5:55 pm

@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.
B
8
S
1
Posts: 67
Reputation: 859

Post » Wed Nov 12, 2014 12:21 am

iwontnamemyself wrote:@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.
B
97
S
22
G
178
Posts: 4,122
Reputation: 104,051

Post » Thu Nov 13, 2014 3:45 pm

I actually tried that already, but it wasn't working. I'll try it again though. :)
B
8
S
1
Posts: 67
Reputation: 859

Post » Thu Nov 13, 2014 3:50 pm

iwontnamemyself wrote: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.
B
97
S
22
G
178
Posts: 4,122
Reputation: 104,051

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 1 guest