Creating Maximum Movement Indicators on a Board

Get help using Construct 2

Post » Sat Aug 10, 2013 2:18 pm

So you essentially want your play tokens (programs) to block movement, or did I misunderstand? Anyways, I added that functionality to my example. :)
B
24
S
9
G
7
Posts: 756
Reputation: 7,292

Post » Sat Aug 10, 2013 11:32 pm

EDIT: No longer relevant. Problem pinpointed.

@Kyatric, feel free to delete this post.Excal2013-08-11 02:40:55
Project Lead of Zems Online Card Game

Producer at Impulse Limited
B
18
S
6
G
3
Posts: 677
Reputation: 5,224

Post » Sun Aug 11, 2013 12:11 am

EDIT: No longer relevant. Problem pinpointed.

@Kyatric, feel free to delete this post.Excal2013-08-11 02:41:08
Project Lead of Zems Online Card Game

Producer at Impulse Limited
B
18
S
6
G
3
Posts: 677
Reputation: 5,224

Post » Sun Aug 11, 2013 1:04 am

EDIT: No longer relevant. Problem pinpointed.

@Kyatric, feel free to delete this post.Excal2013-08-11 02:41:17
Project Lead of Zems Online Card Game

Producer at Impulse Limited
B
18
S
6
G
3
Posts: 677
Reputation: 5,224

Post » Sun Aug 11, 2013 1:42 am

@vee41

Just now saw your comment about setting taken to false for the square the program is sitting on. Definitely is a hacky way to do it, but if it works then it works. Would this be a hacky way to 'reset' it?



Thanks for all your help on this man. Now on to modifying your movement function so the program moves across the squares one at a time instead of instantly jumping to location ;)Excal2013-08-11 06:53:07
Project Lead of Zems Online Card Game

Producer at Impulse Limited
B
18
S
6
G
3
Posts: 677
Reputation: 5,224

Post » Sun Aug 11, 2013 6:46 pm

[QUOTE=Excal] @vee41

Just now saw your comment about setting taken to false for the square the program is sitting on. Definitely is a hacky way to do it, but if it works then it works. Would this be a hacky way to 'reset' it?
[/QUOTE]

Probably depends on whom you ask. :) I'd use a different event that resets the variable whenever token overlaps it. That way there would be no need to reset it that way, depends on your event structure and preference really.

Pleasure to help, your game is looking good!
B
24
S
9
G
7
Posts: 756
Reputation: 7,292

Post » Tue Sep 03, 2013 8:29 am

I'm going to have to bring this up again.

@vee41, are there restrictions or situations where the movement highlighting does not work? It seems to only work 'forward' and not account for spaces behind the object.

For example, I am implementing highlighting of squares a program can attack. It uses essentially the same function.



However, only squares that are 'forward' seem to be highlighted, with some to the side completely ignored.



The same applies for program movement, although I've largely ignored it up til now because it seemed to 'fix' itself if you moved toward a square you should be able to move toward anyway. Here's an example of squares not being highlighted for movement.



The .capx in case you want to run and fire up the debugger to take a look:

BoardGame.capx

UPDATE: I've determined that the function doesn't check for spaces around corners. @vee41, do you know how to accommodate for that?Excal2013-09-03 09:52:28
Project Lead of Zems Online Card Game

Producer at Impulse Limited
B
18
S
6
G
3
Posts: 677
Reputation: 5,224

Post » Tue Sep 03, 2013 8:53 pm

Taking vee41's .capx and changing the moves for each token to 4 yields a similar result.



Excal2013-09-04 06:50:46
Project Lead of Zems Online Card Game

Producer at Impulse Limited
B
18
S
6
G
3
Posts: 677
Reputation: 5,224

Post » Wed Sep 04, 2013 6:51 am

Bumping. I'm still not exactly sure why the recursive function that vee uses seems to miss sometimes.
Project Lead of Zems Online Card Game

Producer at Impulse Limited
B
18
S
6
G
3
Posts: 677
Reputation: 5,224

Post » Wed Sep 04, 2013 11:47 am

@r0j0hound, if you have time, I'm curious as to how you would handle grid movement highlighting. @vee41 has a working implementation that works 90% of the time, but there are some issues sometimes.

Just looking for ideas on another approach.
Project Lead of Zems Online Card Game

Producer at Impulse Limited
B
18
S
6
G
3
Posts: 677
Reputation: 5,224

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: RobertMKD, tarek2 and 10 guests