[Plugin] slg_movement

Post your completed addons to share with the community

Post » Wed Nov 21, 2012 12:01 am

@Joannesalfa

Capx

Sorry, I'm busy recently.
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

Post » Wed Nov 21, 2012 1:18 am

[QUOTE=rexrainbow] @Joannesalfa

Capx

Sorry, I'm busy recently. [/QUOTE]

It works like a charm, Thank you a lot!
B
95
S
25
G
20
Posts: 3,052
Reputation: 22,613

Post » Fri Nov 23, 2012 5:49 am

Update:

Add filter document.

Advance: Filter
The filter feature could re-assign the target instances got by plugin in "action:Get moveable area".
Get move-able tile without any chess standing on it
For example, if designer want to get the move-able tile without any chess standing on it. Add "condition:On filter", and set the filter name into "action:Get moveable area". Use "action:Append filter result" to re-assign the captured UID of instance under "condition:On filter".
In this capx, call "action:Append filter result" only if (expression:TileX, expression:TileY, 1) is empty. So that the tiles with chess standing on it will not be selected.


BTW, the filter could not only select tile, but also could be used to select chess to get the chess target. For example, get the attacked targets.rexrainbow2012-11-23 05:50:46
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

Post » Fri Nov 23, 2012 6:17 am

[QUOTE=rexrainbow] Update:

Add filter document.

Advance: Filter
The filter feature could re-assign the target instances got by plugin in "action:Get moveable area".
Get move-able tile without any chess standing on it
For example, if designer want to get the move-able tile without any chess standing on it. Add "condition:On filter", and set the filter name into "action:Get moveable area". Use "action:Append filter result" to re-assign the captured UID of instance under "condition:On filter".
In this capx, call "action:Append filter result" only if (expression:TileX, expression:TileY, 1) is empty. So that the tiles with chess standing on it will not be selected.


BTW, the filter could not only select tile, but also could be used to select chess to get the chess target. For example, get the attacked targets.[/QUOTE]

When you select an black tile, then select red tile to move over the brown tile? it's no longer that you can't select the brown over red tile area.

Isn't a bug?
B
95
S
25
G
20
Posts: 3,052
Reputation: 22,613

Post » Fri Nov 23, 2012 6:35 am

@Joannesalfa

Uh, sorry, I forget to notify that user need to update grid move behavior.
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

Post » Fri Nov 23, 2012 6:39 am

Cool, thanks!
B
95
S
25
G
20
Posts: 3,052
Reputation: 22,613

Post » Fri Nov 23, 2012 2:40 pm

Uh, I forget to say: user should update instance group.
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

Post » Sun Nov 25, 2012 1:57 am

Hello ,

when I test test_slg_movement.capx, there is an error after the movement when I select the chess for a second time.

Here is the message:
"Javascript error!
ReferenceError: assignment to undeclared variable key
http://localhost:50000/Rex_gInstGroup_plugin.js, line 546 (col undefined)"

Could you help me please?

Thanks

PS: Sorry I don't speak english very well
B
9
S
1
Posts: 20
Reputation: 1,242

Post » Sun Nov 25, 2012 2:24 am

@aktarus

Thanks, I had fix the bug. Please download instnce group plugin again.


PS. My english is not good enough.
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

Post » Sun Nov 25, 2012 3:26 pm

I add another sample capx --
Filter + Cost Function
Combine previous sample capxs
- Filter (event 10): the move-able area of black chess are the tiles which has no chess standing on it.
- Cost function (event 13): the black chess can not move cross "enemy" (the dark yellow chess), it will affect the move-able area, too.

Have fun!rexrainbow2012-11-25 15:35:45
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 1 guest