how to do this?
i already tried with
Code: Select all
collision_box = {{-0.00001, -0.0}, {0.00001, 0.0}},
some help would be appreciated
Code: Select all
collision_box = {{-0.00001, -0.0}, {0.00001, 0.0}},
Dysoch wrote:i am trying to add something that i want to be able to place UNDER buildings and belts, but without being to able to place on top of each other!
If I understand this correctly Dysoch would then have to use resource colision layer to achieve what he wants. Right?kovarex wrote:The collision layers are now:Every object has it's set of layers (bit-mask) and two objects collide when they share at least one layer.
- ground-tile
- water-tile
- resource-layer
- floor-layer
- item-layer
- object-layer
- player-layer
- ghost-layer
well if it was accessible through lua then it would work, but it's not. And from what's been said they'd rather give the modders more options (a second byte for the mask) rather than force them to use the layer's that currently exist. makes me wonder about possible (placement/collision) conflicts between mods though...perhaps some semi-logical names for those layers would be created rather than modders simply arbitrarily choosing one to use? Hm, makes me wonder exactly what the 'floor-layer' is used for though, since the rest seem fairly obvious.SilverWarior wrote:If I understand this correctly Dysoch would then have to use resource colision layer to achieve what he wants. Right?
Or simply use findentities in onbuiltentity to check for any existing ones at the placed coords, not sure which is actually more efficient in the long run but I'd guess findentities since it would only run when placing them rather than saving a table every few minutes.Dysoch wrote:mmmm, maybe i can add them to a glob? and let a check run when you build one that will check the location, and i there is 1 present, it will be auto deleted and placed in inventory.
I think this would only be needed if mod would require new specific layers (existing ones wouldn't fit) desired logic.FreeER wrote:And from what's been said they'd rather give the modders more options (a second byte for the mask) rather than force them to use the layer's that currently exist.
I'm not sure but I suspect that is used for conveyor belts (item/player to belt colision for making items move).FreeER wrote:Hm, makes me wonder exactly what the 'floor-layer' is used for though, since the rest seem fairly obvious.
It would work same as with EntityID, EntityID is internally just 16-bit number and every prototype get assigned the id when you start a new map, this id is used in game to save, for fast indexing prototypes and other stuff, as well as to keep saves small.FreeER wrote:SilverWarior wrote:Makes me wonder about possible (placement/collision) conflicts between mods though...perhaps some semi-logical names for those layers would be created rather than modders simply arbitrarily choosing one to use?
Hm...I'm trying to think ahead to when there might be multiple mods using multiple layers at the same time (more than eight in total, but the assignment would have to place some in the same layers because of the 8 bit limit). If one was using a layer for foundation and another was using it for some type of strange quantum building teleporter (or some other building type thing that you wouldn't want colliding with regular entities for whatever reason) the modders probably wouldn't want the automatic assignment to place them in the same layers. That's probably the best example I can come up with off the top of my head. Now I've no idea how much of an issue this might be, which is why I brought it up.kovarex wrote:Some similar automatic technique would be used for the layers.