[Plugin]Board, Layout2Board [Behavior] Grid Move

Post your completed addons to share with the community

Post » Mon Jun 13, 2016 3:52 pm

Update

rex_board: fix a bug while add a chess with UID to 0.
B
97
S
22
G
178
Posts: 4,118
Reputation: 104,043

Post » Tue Jun 14, 2016 2:19 pm

@rexrainbow

SLGMovement Get Moving Path set to "nearest" seems to have quit working for destinations that are beyond a distance of Cost. It used to fill in the path up to cost even if the destination was out of range. This is probably related to the recent infinite size upgrade?

Correction: never mind. It looks like I can't duplicate the problem. Sorry for the false alarm

yours
winkr7
B
22
S
6
G
2
Posts: 146
Reputation: 2,257

Post » Wed Jun 22, 2016 12:44 pm

Works fantastic rex but if you click and drag really fast you can bypass tiles.

Also can i limit the amount of tiles that one can travel in each go by a variable? (in case equipment or whatever allows further travel, and will also allow me to consume food based on length travelled)
B
17
S
6
G
2
Posts: 40
Reputation: 1,731

Post » Wed Jun 22, 2016 1:48 pm

@skrotar

I am not sure what you want... sorry. Could you explain more detail or provide a simple capx?
B
97
S
22
G
178
Posts: 4,118
Reputation: 104,043

Post » Thu Jun 23, 2016 1:53 am

I was talking about this - The drag to move on a hexagonal map. In your example there when you drag your finger really fast you can "skip" tiles (going along the top/bottom of the tiles instead of through them).... is it possible to fix this?. I did managed to figure how to limit how many tiles you can drag over in one go, but was wondering if there was a way to "count" what tiles are traversed and remove that from a resource variable? for example if you move over a forest tile (takes 2 "food" or whatever) and two grass tiles (each taking one food) for a total of 4 food to be removed from the "food" variable.

https://onedrive.live.com/?authkey=%21A ... faultclick
B
17
S
6
G
2
Posts: 40
Reputation: 1,731

Post » Thu Jun 23, 2016 3:47 am

@skrotar

1. Add "Condition:Are neighbors (UID)" (rex_board) to check next dragging tile is adjacent current dragging tile.
2. Add instance variable to count the cost of moving.
B
97
S
22
G
178
Posts: 4,118
Reputation: 104,043

Post » Tue Jul 19, 2016 7:24 pm

Hello;

I am wondering what to do with the z value of stacked chess, if I make them all z=1 then if I add another chess to x,y,1 I kick the chess that is already there. In the documentation it says

"To avoid kicking, user could assign z-index of each chess by its uid (for example, "uid"+chess.uid), so that all z-index of chess will be different."

should this read "(for example z=chess.uid)" ? so z is a number?

Thanks for your time.

yours
winkr7
B
22
S
6
G
2
Posts: 146
Reputation: 2,257

Post » Tue Jul 19, 2016 11:39 pm

@winkr7

Z index could be number or string, the expression is "prefix + chess.uid", like
Code: Select all
"uid" & chess.uid
B
97
S
22
G
178
Posts: 4,118
Reputation: 104,043

Post » Wed Jul 20, 2016 12:27 pm

@rexrainbow

That makes sense.

thankyou for your time.

yours
Winkr7
B
22
S
6
G
2
Posts: 146
Reputation: 2,257

Post » Sat Jul 30, 2016 7:14 am

Hi @rexrainbow

I'm using your Board, squareTX and GridMove plugin to make a isometric puzzle game. Thank you for such awesome plugins / behaviors!
Now I have a few questions.

GridMove
Is it possible to let the player jump? So that you can jump over a obstacle on the board?

Board

I generate a board with a few missing tiles. So that the player can drag and drop the missing tiles on his own. Is there a proper way to check if the tile gets dropped over an empty spot on the board?
I'm currently using something like this.

Image

But with this code you have to put it very exactly, otherwise it won't fit. Better would be to snap it to the grid if it overlays an empty cell in the board.
Have you any code examples for using drag and drop to but tiles on the board?

Here is a demo of the current state of the game.
https://dl.dropboxusercontent.com/u/105 ... index.html

Thank you!

Regards
Andy
Image Image
The Apple logo, iPhone, iPod touch, and iTunes are trademarks of Apple Inc., registered in the U.S. and other countries.
B
69
S
23
G
21
Posts: 904
Reputation: 20,758

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 1 guest