[Plugin]Board, Layout2Board [Behavior] Grid Move

Post your completed addons to share with the community

Post » Tue Aug 16, 2016 8:18 pm

Hi rexrainbow,

I have been using a couple of your plugins (most notably the grid move and board ones) and they are fantastic! Thanks a bunch for coming up with all of them!

I would like to know if there is a way to set an object to the board without having to create it first? Say for example if I have several instances of one object which I have already assigned to certain positions on the layout but I still want to use the grid move behaviour based on the board.

Any help would be greatly appreciated!

- StomachBug
B
7
S
2
Posts: 14
Reputation: 548

Post » Wed Aug 17, 2016 1:07 am

@StomachBug

Uses "Action:Add chess" (rex_board plugin) to add chess into a board, it only set the logical position without changing the physical position.
If you want to put a set of chess, you might see rex_layout2board plugin.
B
97
S
22
G
178
Posts: 4,122
Reputation: 104,051

Post » Wed Aug 17, 2016 10:49 pm

@rexrainbow

Hello;
I have found trouble with the remove edges action in the edge plugin.
Line 48 of the capx file I have attached below. It does not recognize it properly at startup.

delete edges works.

I appreciate your plugins, and thankyou for your time.

yours
winkr7


https://www.dropbox.com/s/snro2cg997pmxmy/meg.capx?dl=0
B
22
S
6
G
2
Posts: 146
Reputation: 2,257

Post » Thu Aug 18, 2016 2:50 am

Update

rex_board_edge plugin: fix a name error



@winkr7
Fixed, thanks for reporting this bug. Please update that plugin again.
BTW, "action: remove edge" only removes the reference in rex_board_edge plugin, it will not destroy them, uses "action: destroy edge" to remove reference and destroy edge instances at the same time.
B
97
S
22
G
178
Posts: 4,122
Reputation: 104,051

Post » Thu Aug 18, 2016 6:35 am

@rexrainbow

Thanks lots. It is working now.

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

Post » Sat Aug 20, 2016 3:14 pm

rexrainbow wrote:@StomachBug

Uses "Action:Add chess" (rex_board plugin) to add chess into a board, it only set the logical position without changing the physical position.
If you want to put a set of chess, you might see rex_layout2board plugin.


Hi @rexrainbow ,

Thanks that worked a treat! Another thing I wondered is if it is possible to make the GridMove behaviour have a more 'snapping' like action?

At the moment I am using a gamepad to control movement of an object but what is happening is too smooth a movement. Is there a way to have the motion behave so that even if the thumbstick is pressed in any given direction, the object will movement step by step instead of smoothly? For example like how objects move if you drag them around in the layout editor with the snap to grid active?

Many Thanks
B
7
S
2
Posts: 14
Reputation: 548

Post » Sat Aug 20, 2016 3:36 pm

@StomachBug

Set the "MoveTo" to "No" in property table to disable the built-in moving in rex_grid_move behavior. Designer could maintain physical moving manually, like adding tween moving.
B
97
S
22
G
178
Posts: 4,122
Reputation: 104,051

Post » Sun Aug 21, 2016 2:41 pm

rexrainbow wrote:@StomachBug

Set the "MoveTo" to "No" in property table to disable the built-in moving in rex_grid_move behavior. Designer could maintain physical moving manually, like adding tween moving.


@rexrainbow

Ok, so I have set "MoveTo" to "No" and am moving the object by (example) "Self.X - 32" much like what the chess piece does in your first Board tutorial but I may actually need to go back to using the MoveTo function for the physical object as well due to overlapping issues. I have a couple of questions based on the game I'm working on:

Using GridMove, this can help prevent objects overlapping one another in the same space. A problem I have found is that if I make the size of an object different to what the Board tile size is then objects tend not to collide and easily move across one another. Is there a fix for this or am I using the behaviour wrong?

Also do you know of a way by using the thumbstick on a gamepad to have an object move step by step instead of smoothly? Basically having the object move to the desired position, waiting a moment and then moving once more even while the thumbstick is towards any given position at any time?

If you have the time to take a look at my capx it would be greatly appreciated.

https://drive.google.com/open?id=0B3txcMQrB2eWWDY1dl9ScTNpcTg

Thank for all your help!
B
7
S
2
Posts: 14
Reputation: 548

Post » Mon Aug 22, 2016 3:41 am

@StomachBug

Setting the "MoveTo" to "No" only skips the physical moving, the logical moving still works.
After calling Action:Move to neighbor/Action:Move to chess/Action:Move to LXY, the logical position will move to target logical position, then designer can get the responded physical position by ( Board.UID2PX(sprite.uid) , Board.UID2PY(sprite.uid) ). i.e. the chess moves
from ( sprite.X, sprite.Y ) to ( Board.UID2PX(sprite.uid) , Board.UID2PY(sprite.uid) )
B
97
S
22
G
178
Posts: 4,122
Reputation: 104,051

Post » Tue Aug 23, 2016 7:36 pm

rexrainbow wrote:@StomachBug

Setting the "MoveTo" to "No" only skips the physical moving, the logical moving still works.
After calling Action:Move to neighbor/Action:Move to chess/Action:Move to LXY, the logical position will move to target logical position, then designer can get the responded physical position by ( Board.UID2PX(sprite.uid) , Board.UID2PY(sprite.uid) ). i.e. the chess moves
from ( sprite.X, sprite.Y ) to ( Board.UID2PX(sprite.uid) , Board.UID2PY(sprite.uid) )


Thanks @rexrainbow, I'll give it a try.

Also should different sizes of objects on the board matter? I find that they continue to overlap when moving into one another instead of stopping movement. Is this right as when they are a uniform size they will stop moving.

Thanks
B
7
S
2
Posts: 14
Reputation: 548

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: Vol6tmetr and 5 guests