Link here for pic
This is quite hard to explain so I have created a picture. Not sure if it will show up though since my preview button don't seem to work correctly. Keeps saying "there is nothing to preview".
Anyway can someone please help me on the following problems, Firstly on how to detect part of another object but at the same time not detect the whole thing. I just need to detect the edge of the wall. This is for the framework which I'm working on. To use click on the top right icon and a menu will appear then click on 1 and then the icon and the green square will become a tower. The towers can be rotated with the z key. Drag the tower to the wall and release to place tower there. This type of tower can only fire in 1 direction and can be only be placed next to a wall.
The current solution in the capx is the closest I have gotten, but its not what I need. The current solution works by dragging the icon into the wall then the tower appearing 1 square at the angle it is facing.
The base object stops certain problems too. This solution also still doesn't solve the problem of the towers appearing in the wall itself, not to mention the other problem is that it allows duplicates, Even if the tower exists it creates another one on the same spot.
Here the list of things I need it to do.
1. Detect the edge of a wall so that a tower can be placed there.
(top right picture)
2. Not detect the actual wall itself, no towers should be allowed to be placed there.
3. Not allowed to place towers in white squares. (where not next to a wall)
4. Not allow duplication if a tower already exists.
Phew, I think that is everything and I hope I have explained it well enough.
Here is the Capx Link
Here is the pic if it don't display.
Thanks for your time everyone.