Shore Building
2 replies



19.12.18 05:46:27 pm
Hey,
I want to create a building for the shore (should be partly on water, partly on land). The definition buildingspace=shore ist not working (it's like buildingspace=land and water). I also experimented a lot with selectplace, just to find out, that this is an event separate from the building positioning mode. Which is too bad, because having a selectplace_y would solve my problem. Do I have to recreate the whole building positioning mode with the selectplace event or do you guys see any other way??
I want to create a building for the shore (should be partly on water, partly on land). The definition buildingspace=shore ist not working (it's like buildingspace=land and water). I also experimented a lot with selectplace, just to find out, that this is an event separate from the building positioning mode. Which is too bad, because having a selectplace_y would solve my problem. Do I have to recreate the whole building positioning mode with the selectplace event or do you guys see any other way??
Truth is not an opinion.
Here are build places from the code:
Code:
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
Select val$
Case "land" typ=0
Case "land and water" typ=1
Case "water" typ=2
Case "shore" typ=3
Case "hill" typ=4
Case "shallow water" typ=5
Case "at object" typ=6
Case "land" typ=0
Case "land and water" typ=1
Case "water" typ=2
Case "shore" typ=3
Case "hill" typ=4
Case "shallow water" typ=5
Case "at object" typ=6
Mmh, yes, I know that theoretically there is the possibility to define a building as “shore”-building. But practically that leads to a building, that can be placed both, on land and on water. Exactly like the “land and water”-building. So these definitions don’t help.
The moment the building is placed, it has an ID that can be called with
lastbuildingsite. Then I can check, whether it is at the shore (e.g. by making sure that -10<y<10) or delete it otherwise. But I don’t love that solution. I would prefer to cancel it with
skipevent:
But that is only possible, if there’s any way to get the y earlier or to check the half-water, half-land requirement otherwise!
The moment the building is placed, it has an ID that can be called with


Code:
1
2
3
4
2
3
4
on:build_start
{
if (abs($y)<10) {skipevent;}
}
{
if (abs($y)<10) {skipevent;}
}
But that is only possible, if there’s any way to get the y earlier or to check the half-water, half-land requirement otherwise!
Truth is not an opinion.



