[Plugin]Board, Layout2Board [Behavior] Grid Move

Post your completed addons to share with the community

Post » Wed Dec 19, 2012 12:38 am

@felixsg

Sorry, I put wrong link, this is correct one - sample capx
B
97
S
22
G
178
Posts: 4,122
Reputation: 104,051

Post » Tue Jan 08, 2013 8:31 am

Update:

[Behavior] Grid move -
Add "condition: On get destination's solid", "action: Set destination's solid", to assign "logic" solid property from event.
So that user could decide the chess could move to the tile or not more easily at event sheet.
Sample capx

This feature is an option, user could still use official solid behavior to block the moving.rexrainbow2013-01-08 15:23:33
B
97
S
22
G
178
Posts: 4,122
Reputation: 104,051

Post » Wed Jan 09, 2013 4:35 pm

Hey rexrainbow,

I'm using your board plugin's pack a lot - real time saver.

Will it be diffcult to implement the following features?

1)Set board height and width (number of elements on the X/Y axes) in run-time (like in event editor). Similar method as in Array Object (Array.setSize)
2)Get board height & width xoros2013-01-09 16:56:53
B
42
S
11
G
4
Posts: 505
Reputation: 7,267

Post » Thu Jan 10, 2013 12:46 am

@xoros

1. "Action:Reset board" could assign board height and width ,and reset the board to empty.
2. "Expression: BoardWidth, BoardHeight" could get board height & width (you need to download the new version of board plugin again)rexrainbow2013-01-10 00:58:18
B
97
S
22
G
178
Posts: 4,122
Reputation: 104,051

Post » Thu Jan 10, 2013 1:00 am

Update:

[Plugin] Layout2Board
- add an alert message when setting wrong grid width & height, wrong grid width & height will cause non-integer logic index.rexrainbow2013-01-10 01:02:11
B
97
S
22
G
178
Posts: 4,122
Reputation: 104,051

Post » Thu Jan 10, 2013 8:54 am

Thanx man,

Great, now I can get width and height.

I already noticed "ResetBoard" method, but the problem is, that after setting new dimensions, entire board information is lost. Of course it is possible to "refill" the board with instances from layout again using Physical Coordinates to Logical Coordinates (or your layout to board plugin), but I assume that under some circumstances it can cause glitches, e.g. if instance is being animated or something like that.

Another solution could be saving the board information somewhere and than load it after setting new dimensions.
B
42
S
11
G
4
Posts: 505
Reputation: 7,267

Post » Thu Jan 10, 2013 9:16 am

@xoros

Okey, I will make an action to assign width and height without clean all chess.
B
97
S
22
G
178
Posts: 4,122
Reputation: 104,051

Post » Thu Jan 10, 2013 9:27 am

Many thanks, man.
B
42
S
11
G
4
Posts: 505
Reputation: 7,267

Post » Thu Jan 10, 2013 5:07 pm

First of all thank you for this great plugins and behavior.

I created 2 chess objects one for player, and one as a npc.(chess,chess2)
I used board and squareTX. Board is bigger then window size.

Player directs chess object with arrow keys. When there isn't chess2 object. Camera automove with chess object. ( I don't know where autocamera came from. Maybe It's part of board plugin)

If I create chess2 as npc. And give it wander. If chess(player) moves 1 square global turn is turn++. And if global npc value is lesser then global turn. Wander. (I just trid to create turn based movement system as I can)

But then camera wants to move also with chess2 object as it wander. So If both objects gets far away from each other, camera centers them and looses both objects. I just want camera to follow chess object. :) Where do I do wrong or what do I have to do. Thank you very much.

oh by the way. Is there a way with your plugins to easily "if player is 3 squares near to npc object then pick that npc object and do smth with it (make chase player).

I bet even if I can do it with your plugin I can't count if npc see player then follow it. If there is solid object between them, then you can't see player, so don't try to follow him :D   
B
7
S
1
G
1
Posts: 76
Reputation: 904

Post » Fri Jan 11, 2013 3:52 am

@Spider_hip

The camera is controlled by scroll-to behavior, not in board plugin.

I will think about add a distance checking condition/expression, try to add a "line of sight" plugin, thank you for this suggestion.

rexrainbow2013-01-11 04:12:04
B
97
S
22
G
178
Posts: 4,122
Reputation: 104,051

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: zenox98 and 2 guests