I have game set up where you click the ground and a building appears beneat your mouse (on the ground model). That script is working spectacularly. The next step is disallowing building placement on top of eachother. I figure there are two ways to do this. Grid placement or free placement. For grid placement I think I would need to be able to put all of the faces in the ground model into an array and turn each face on and off as things are placed on them or removed from them. Haven’t looked into how that might be done, yet.
I’m trying free placement, though, which currently allows you to drop a building half-way on top of another building, as long as you click on the ground next to an existing building (so they are partially merged). I’m trying to use a Near sensor attached to an End Object actuator (I look for the building being near another building with the property “building”). Currently, if I set the sensor distance too high, buildings terminate regardless of their proximity to another building (that number seems to be .999+). If I drop it below that value, buildings still merge and only delete if they’re really close. Anyway, if you can understand what I’m talking about, where I should I look to sort out what’s happening?
If all else fails I’ll drop “bases” first, which will be dirt meshes or some such, then child the buildings on top of those (so the base will be much larger in area than the building, allowing merging of bases but not buildings).