RTS Design Help

This forum is currently in read-only mode.
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • 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

    PS how do you 'attach' files like I've seen other people do?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Wait, my maths was mixed up. Fixed now, but it still doesn't work

  • This must be my fifth or so thread with no replies

  • 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?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)