[Plugin]Board, Layout2Board [Behavior] Grid Move

Post your completed addons to share with the community

Post » Sat May 19, 2012 12:33 pm

Yes that's what i meant. You made it work for simple board games like chess, but if you want a bigger playing field you have alot of tiles that you may not always need. A virtual board grid would be pretty useful. With a virtual board you can have a single background image and still use the grid.

But i understand this is probably hard to do.
Your plugins are very helpful!
B
6
S
1
G
4
Posts: 66
Reputation: 1,532

Post » Wed Jul 11, 2012 6:32 am

Hi!
First, really thanks for the plugin! I've been doing a research on the board looking for anything that can help on my project and this saved me a lot of work!

Then I found something that could be a bug.

Since Construct demands that you put the object on layout, I did as you on your example: destroy the object and then recreate it as a chess on the wanted position. The two objects were the Player and the Monster.

But now, I tried to make the Monster follow the player (some tests before doing a pathfinder). This is what I put:



And this is the logic block that is called before it, when setting Player and Monsters on the map:


But then, it raises this error when I try to walk:


Is the X property of Player undefined?

Here is the project file:
http://www.sendspace.com/file/718yc5

If the Monster and/or the player spawns over a solid tile, just refresh it. The map is random.
B
15
S
1
Posts: 16
Reputation: 1,033

Post » Wed Jul 11, 2012 7:37 am

Update:

[behavior] grid move
- fix bug at expression: TargetX, TargetY. Now these will return target position (x,y) correctly.

[plugin] board , squareTx, hexTx
- update something inside...


BTW
I made new CubeTx plugin to create "cube" world.
Here is a sample.
- mouse wheel down: change textures
- left click: create a new block
- right click: remove the block




@Epiplon

Update the latest version of grid move behavior, it might solve the problem.
B
97
S
22
G
178
Posts: 4,121
Reputation: 104,049

Post » Wed Jul 11, 2012 9:06 am

@rexrainbow
Looks interesting, does it have a way to get the z for stacked blocks?
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Wed Jul 11, 2012 9:23 am

@newt

Uh, what are you mean "z"?

In my cubeTx plugin, yes, z is one of the parameter of the chess (block) -- each chess has (x,y,z) parameter stored in board plugin, and there has expression:UID2LZ to get z index from (instance's) uid.
CubeTx is very similar with squareTx, I just add an offset by z index.
rexrainbow2012-07-11 09:44:00
B
97
S
22
G
178
Posts: 4,121
Reputation: 104,049

Post » Wed Jul 11, 2012 9:46 am

Yeah, thats the "z".
Thanks.:)
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Thu Jul 12, 2012 3:26 am

@rexrainbow

Fixed. It doesn't give errors anymore.
B
15
S
1
Posts: 16
Reputation: 1,033

Post » Sat Jul 21, 2012 10:04 am

Update:

Add action:wander into grid_move behavior.
Demo
Sample
Wander range could be assigned in properties table or by actions.

Also please update board, squareTx, hexTx plugin.rexrainbow2012-07-22 02:33:38
B
97
S
22
G
178
Posts: 4,121
Reputation: 104,049

Post » Mon Jul 23, 2012 8:54 am

Update

Grid move behavior:
Add "condition:On colliding begin" to get collided target.
For example, chess A try to move to left grid, and there is a chess B at it's left side. Then this moving will trigger "On colliding begin with chess B".
Because that "chess B" might be the same kind sprite with "chess A", I use instance group plugin to save the uid of collided chess B. User could pick instances of collided chess B by instance group object.

Here is an example -- push box.
- use arrow key to move character.
And it's capx


Also, please update board, squareTx, hexTx plugins.rexrainbow2012-07-23 09:53:03
B
97
S
22
G
178
Posts: 4,121
Reputation: 104,049

Post » Mon Jul 23, 2012 10:27 am

nice new example... looks a bit like Sokoban :)
B
42
S
9
G
6
Posts: 437
Reputation: 5,626

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: X3M and 1 guest