Not logged inOpenClonk Forum
Up Topic [Project] Castles.ocd

This board is threaded (i.e. has a tree structure). Please use the Reply button of the specific post you are referring to, not just any random button. If you want to reply to the topic in general, use the Post button near the top and bottom of the page.

Post Reply
In Response to Clonkonaut
IsBelowSurfaceConstruction is a special functions for construction that can be placed below the surface of the landscape. Like basements do whenever you build them below another construction. The construction previewer (what you place when selecting the hammer) will try to place the construction site deeper down if it's set to true. Also, when the construction starts (all building material present), there will be no landscape obstruction checks. But it has nothing to do with the sticking feature of connecting buildings.

The main functions for sticking together are ConstructionCombineWith(), ConstructionCombineDirection() and whatever callback ConstructionCombineWith defines. Examples are the wooden bridge, the basement and the elevator (the elevator would be one that doesn't use IsBelowSurfaceConstruction because it's not one).

The construction site itself does not fall down (because it's a StaticBack object). But it of course creates the building at some point (all building material present) and starts to build it. Because the building is created with Con 1 and not 100, Initialize will not be called. In order to have your buildings float, you need to do something about that in Construction() or in CombineWith(object) - which is called as soon as creation is done and tells you which other building this one should stick to. Of course, this means to change the category to StaticBack or similar techniques to make it float (e.g. the basement changes to StaticBack in Construction()). Otherwise it will fall down because C4D_Structure objects do that.

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill