RTS Design Help

For questions about using Classic.

Post » Wed Mar 23, 2011 7:26 am

Cube game again...hopefully someone will answer this time...

What I'm trying to get the game to do is recognise certain formations of occupied tiles (placements of cubes) and create an object that produces 'marines' or in this case, just make a mine to give off resources.
Anyway, so the way I attempted was to set the private variables 'x' and 'y' of each occupied tile, and then detect whether the x and y co-ordinates of other occupied are the appropriate amount of distance away from the top left tile in a formation of a cross with the middle empty. But nothing happens when I make the appropriate formation and I've checked it on all the different levels of detection and it doesn't do anything. Is there some way to get this to work, like spamming 'for each tile' everywhere or something?
You can find the event sheet under 'mine detection':

http://www.mediafire.com/?dhwmd2cs6zv9yel

[size=50:mdmq1s9b]PS how do you 'attach' files like I've seen other people do?[/size:mdmq1s9b]
B
5
S
1
G
1
Posts: 43
Reputation: 888

Post » Wed Mar 23, 2011 8:54 am

Wait, my maths was mixed up. Fixed now, but it still doesn't work :(
B
5
S
1
G
1
Posts: 43
Reputation: 888

Post » Thu Mar 24, 2011 9:54 am

This must be my fifth or so thread with no replies
B
5
S
1
G
1
Posts: 43
Reputation: 888

Post » Thu Mar 24, 2011 12:54 pm

I'm not sure I understand, do you want a red cube to be placed when the white cubes are placed in a certain formation? Could you post an image of what the formation (with red cube) should look like if the code was working correctly?
B
4
S
1
G
1
Posts: 63
Reputation: 776


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests