Forum

> > Stranded II > Scripts > Shore Building
ForenübersichtStranded II-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Shore Building

2 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Shore Building

Klirkz
User Off Offline

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

alt Re: Shore Building

Assassin moder
User Off Offline

Zitieren
Here are build places from the code:

1
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

alt Re: Shore Building

Klirkz
User Off Offline

Zitieren
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 s2 cmd 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 s2 cmd skipevent:
1
2
3
4
on:build_start
{
	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!
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtStranded II-ÜbersichtForenübersicht