Buildingsystem with Tilemap and bitmask

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By JeremiasDev

Hello, I want to make it possible to build fences in my game, but the problem is I want it with a bitmask or that it connects automatically. Like the fences at Clash of clans, how do I do that?

:bust_in_silhouette: Reply From: Cody Sass

What’s the problem you’re running into? That looks like a basic autotile.

Hi, how can i build in Game with bitmask and with the Code that the Player can build a fence… Can you say a Code to build ingame?

JeremiasDev | 2020-12-28 08:44

Using TileMaps — Godot Engine (stable) documentation in English

TileMap — Godot Engine (stable) documentation in English

If you want to change a tile with code, you’ll want to specifically look at
set_cell ( int x, int y, int tile, bool flip_x=false, bool flip_y=false, bool transpose=false, Vector2 autotile_coord=Vector2( 0, 0 ) )

Cody Sass | 2020-12-28 15:32