[Plugin]Board, Layout2Board [Behavior] Grid Move

Post your completed addons to share with the community

Post » Wed Oct 24, 2012 1:35 am

Update:

Board plugin: add "condition:Pick all chess on the board" to pick all chess (and tiles) into SOL
Chess behavior: this behavior might help user get logic index (LX, LY, LZ) and neighbor UID more easily.
Capxrexrainbow2012-10-25 01:48:13
B
97
S
22
G
178
Posts: 4,121
Reputation: 104,049

Post » Thu Oct 25, 2012 3:53 pm

Thanks!!!Ga2Z2012-10-26 17:01:13
B
4
S
1
Posts: 22
Reputation: 671

Post » Mon Nov 05, 2012 1:14 pm

@rexrainbow awesome plugin, as usual! :) Btw, I'm having a little trouble with grid move. It seems I can't grid move 2 sprites at once. Here's the CAPX of what I'm trying to do. To recreate, wait until there are no matches, then click on two adjacent tiles. Only one is moving.. :(.
B
21
S
5
G
5
Posts: 58
Reputation: 5,232

Post » Mon Nov 05, 2012 11:00 pm

@soybean

Uh, do you try to swap two chess?
The other chess will be kicked off the board when one chess occupied it's space (the same x,y,z), the kicked chess is no longer at board and it could not "move" on the board.
Board plugin has "action: swap" to swap two chess in one action.
Or you could assign logic Z of chess to it's UID, so that all chess will never occupy to each other, then they will never be kicked off, and could move to any (x,y) at board.rexrainbow2012-11-05 23:13:01
B
97
S
22
G
178
Posts: 4,121
Reputation: 104,049

Post » Tue Nov 06, 2012 4:35 am

@rexrainbow

Still not working. I've fixed my capx because I realized the sprite for moving around needs chess behavior. It should be correct now, but the grid move is still stuck on 1 chess (the second selected chess).

The logic swap works though. But not the physical movement. I tried moving the Z for both swapping chess (1 and 2) but when I logged the Z, it still outputs 0 (doesn't seem to work)

Another thing, you can swap diagonally and it works, but when I redo it on the same chess sprite, it won't work.

Btw, I tried assigning the chess on different Z values on creation, but it seems the matcher plugin is only able to match chess on Z = 0.

Updated CAPX

Thanks
B
21
S
5
G
5
Posts: 58
Reputation: 5,232

Post » Fri Nov 16, 2012 11:22 am

Hey rexrainbow, following question:

Is it possible to move a chess to the chosen (clicked) tile, so that the chess doesn't overlap another chess objects while moving (evades another objects). GridMove>MoveToTarget moves the chess straight to the tile and overlaps another objects on the way.

I think it is sort of path-finding. May be there's a work around for that?
B
42
S
11
G
4
Posts: 505
Reputation: 7,267

Post » Fri Nov 16, 2012 2:34 pm

@xoros

Plugin: slg_movemen, the sample capx is the answer of your question.rexrainbow2012-11-16 14:36:01
B
97
S
22
G
178
Posts: 4,121
Reputation: 104,049

Post » Fri Nov 16, 2012 2:54 pm

Man, thank you again! I'm speechless.xoros2012-11-16 14:59:08
B
42
S
11
G
4
Posts: 505
Reputation: 7,267

Post » Fri Nov 16, 2012 3:04 pm

@xoros

You're welcome.
Finally, I release slg_movement plugin, It had been made a long time ago.
B
97
S
22
G
178
Posts: 4,121
Reputation: 104,049

Post » Fri Nov 23, 2012 5:33 am

Update:

[Plugin] Board
Add "condition:On chess kicked". It will be trigger when the chess had been kicked from board when executing "action:Add tile", "action:Add chess", "action:Move chess", since a (x,y,z) only allows one chess.
For example, running "action:Create chess" at (1,1,1) twice, the first chess will be kicked from board.

[Behavior] Grid move
If set "Property:Force move" to "Yes", grid move behavior will not check "solid" and logic overlapping. And the z index of chess will be changed when overlapping to other chess (to avoid overlapping), this feature could make the chess "cross" other chess with the same z index.
For example, there is a chess at (1,1,1). Now another chess want move from (0,0,1) to (1,2,1).
- Finding moving path by slg_movement plugin
- then moving chess by grid move behavior with "Force move" mode.
The possible moving index might be
(0,0,1) -> (1,0,1) -> (1,1,"#30") -> (1,2,1)
Grid move behavior will change z index when logical overlapping to other chess at (1,1,1). So no chess will be kicked after this moving.rexrainbow2012-11-23 05:34:32
B
97
S
22
G
178
Posts: 4,121
Reputation: 104,049

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 2 guests