[Plugin] slg_movement

Post your completed addons to share with the community

Post » Mon Apr 01, 2013 2:49 pm

Hi Rexrainbow,

I'm glad to hear that this situation might bring even more great ideas for upcoming plugins.

I understand your approach to solve this issue, but I can't translate it into C2 condition + action (unfortunately). I tried using the "compare two values + distance" under "system" but I seem to fail in selecting the right tiles.

When you'll have a bit more free time, would you be able to point out how the condition+action should look like to deal with this situation? (i.e. Get all of distance between move-able tiles and target tile, then pick the minimum one. ). For example, would any this involve a specific usage of the SLGmovement (or can it all be done via "system + compare two values" + tile selections?).

Thanks, as always!
B
26
S
9
G
1
Posts: 13
Reputation: 3,258

Post » Tue Apr 02, 2013 1:41 am

Capx - pick nearest tile
User need to update instance group plugin first, I had fixed a bug about sorting.

Steps:
1.Get move-able tiles.


2. sorting move-able tiles by function.

Instance group plugin will pick two UID (expression:CmpUIDA, CmpUIDB) and ask which one "is bigger" through "condition:on sorting function". Put answer by "action:set compare result"

3. the nearest tile is at the 1st item of "area" group.


@Sobieski74

Here it is.rexrainbow2013-04-02 04:07:14
B
97
S
22
G
178
Posts: 4,121
Reputation: 104,049

Post » Wed Apr 03, 2013 2:18 am

This seems very advanced and highly interesting!

I am thankful for your help and explanation Rexrainbow (as such a list of conditions and actions would never have occured to me on my own).

I will let you know how it goes once I integrate it into my capx (later this week).

As always, if it works I'll be happy to share it so that everyone can gain from our exchange.

Thanks!
B
26
S
9
G
1
Posts: 13
Reputation: 3,258

Post » Wed May 22, 2013 12:36 pm

[QUOTE=rexrainbow] @Vati-nyan

Sound nice, what's the problem? Do you mean select the enemies in the range of 4 cells (for example)?[/QUOTE]

Hello again! Some things happened over easter that forced me to focus more on my main project again, so took a while... but I'm back at trying to make this work.

My problem is mostly that movement based on your examples work nicely.But I also want to somehow be able to click an enemy chess within that movement range, have my chess move next to it, and then initiate combat.

So I guess your example there is right, yes.
B
10
S
3
G
3
Posts: 110
Reputation: 2,206

Post » Wed May 22, 2013 4:45 pm

Approach target

Demo
- drag or arrow key to move black chess at blue tiles
- green enemy will approach to black chess
Capx
Get shortest moving path from green chess to black chess. Then move to the first tile at moving path.
rexrainbow2013-05-22 17:19:50
B
97
S
22
G
178
Posts: 4,121
Reputation: 104,049

Post » Thu Aug 08, 2013 11:22 pm

@rexrainbow,

First of all, thanks a lot for this plugin. It's really powerful and hard to master. I have a small question about the plugin possibility though. I was wondering if it was possible to make the Enemy Object having exactly the same behavior of the Chess Object.

what I mean is, for example in final fantasy tactics, when the player plays against the CPU, the CPU does exactly like the player:
- First it chooses a Tile where it will do its next move (we can see the CPU choosing the path -> it is the blue tiles)
- Second it moves at that particular Tile
- The CPU tries most of the time to get near the player

I wanted to do the same thing. I still searching because I think it is possible to do it with your plugin. I wanted to use the "get nearest tile" algorithm for the CPU so that the CPU will always try to approach the player to attack him.

Here are some images of what I'm talking about:




Thanks.anthonykojima2013-08-08 23:23:12
B
41
S
10
G
7
Posts: 182
Reputation: 9,999

Post » Sun Aug 11, 2013 12:00 am

@anthonykojima

Try this.
B
97
S
22
G
178
Posts: 4,121
Reputation: 104,049

Post » Tue Oct 01, 2013 3:52 am

@rex
Awesome,Great job.
May I ask a question? different players and different enemys,have different status,how to control? I try using C2 Family,but failed.:(

Thank you again.

test.capx
123456
B
10
S
1
G
1
Posts: 2
Reputation: 998

Post » Sat Nov 23, 2013 4:39 pm

there is a bug in the plugin



Plaese report to developer
B
12
S
5
G
4
Posts: 176
Reputation: 4,384

Post » Mon Nov 25, 2013 8:38 am

@istavang

It might be that, this slg_movement need to access a board object. Please check it.
B
97
S
22
G
178
Posts: 4,121
Reputation: 104,049

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: matriax and 2 guests