[Plugin]Board, Layout2Board [Behavior] Grid Move

Post your completed addons to share with the community

Post » Thu May 16, 2013 10:21 pm

@rexrainbow
Thank you rex! Amazing work you do for this community!

I've a probably stupid question:
What is the difference between creating the x,y loop and picking the chess while it can move down and simply create "GridMove can move to" as a condition? Both works but I assume there are differences

B
6
S
1
Posts: 16
Reputation: 464

Post » Fri May 17, 2013 1:42 am

@Raziel

The logic is -
The chess are falling from top to buttom, so checking chess from bottom to top (see the y-index) . If the chess could fall down, pull it down, ...until it can not fall down.

Or you could just use grid move repeat to replace "while it can fall down".
B
97
S
22
G
179
Posts: 4,126
Reputation: 104,559

Post » Mon May 20, 2013 7:11 pm

Hi, I'm new to construct 2 and I tried your layout2board-Example but had a problem with the "move to target"-Action.
I want to learn how to create a turnbased-grid-movement-Game.

So I used your example with the black Chess-Tile and the blue Tiles as underground.

1. I created an Enemy-Tile as a clone of the chess-tile.
2. I put Chess and Enemy on a second layer
3. I insert the Event:
Every 1.0 Second -> Enemy move to target Chess.

But it won't move ... ,____,

If I use wander it works fine, but it won't work with the move to target-Action ...

Can you tell me what I did wrong please?
B
2
Posts: 5
Reputation: 185

Post » Tue May 21, 2013 4:33 am

@KLRG

I'm not sure, could you provide me a simple test capx?
B
97
S
22
G
179
Posts: 4,126
Reputation: 104,559

Post » Tue May 21, 2013 9:28 am

https://www.dropbox.com/s/rrakhnoq32zp9pj/Move_to_Target_Test.capx

This is the modified file.
B
2
Posts: 5
Reputation: 185

Post » Tue May 21, 2013 9:45 am

@KLRG

Uh, the enemy could not move to (logic X of Chess, logic Y of Chess) if they are at the same Z index. They are in the same logic space.
You could set the enemy to Z=2. And the logic X of Chess could be got by expression:Board.PXY2LX(Chess.X, Chess.Y). logic Y of chess is expression:Board.PXY2LY(Chess.X, Chess.Y)

Here is the modified capx


The enemy will move to Chess directly.
B
97
S
22
G
179
Posts: 4,126
Reputation: 104,559

Post » Tue May 21, 2013 10:31 am

I can't open it, because it said something about a newer Version 130, but I just have 126. But I don't know how to update it. There is no update in Steam or something like that ...
B
2
Posts: 5
Reputation: 185

Post » Tue May 21, 2013 10:33 am

@KLRG

r131, the latest released.
B
97
S
22
G
179
Posts: 4,126
Reputation: 104,559

Post » Tue May 21, 2013 11:13 am

Thanks. Now it works.

By the way. Is there a way to let the enemy walk only 1 step per second? I want him to move to me with one step per second.
B
2
Posts: 5
Reputation: 185

Post » Tue May 21, 2013 11:48 am

@KLRG

You need assign the moveing direction like the moving of black Chess.
You could use slg movement plugin to find path, then move it.
Or assign the moveing direction by other logic. I had not made action for this logic ("moving closely" or "run away").rexrainbow2013-05-21 11:50:51
B
97
S
22
G
179
Posts: 4,126
Reputation: 104,559

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: matriax, shinkan and 2 guests