Brush with tiles on different layers

Hey, is it possible to create a sort of brush that will place one tile on a layer, and another tile on another layer? (Tree trunk + tree leaves)

Yes, if you install the latest development snapshot, which includes this feature:

You can find it on https://thorbjorn.itch.io/tiled listed as “snapshot”.

1 Like

Big thank you! It works great. A few bugs with the cursor but otherwise it’s super useful, thanks. :slight_smile:

1 Like

That’s great to hear! But please elaborate on the bugs with the cursor that you noticed.

Hi bjorn,

Simply, often times the mouse cursor is the hand grabbing instead of the arrow pointer or whatever it should be. Only a visual glitch though.

One thing I’ve noticed about using brushes on multiple tile layers is if one layer is hidden, the entire brush doesn’t show up. I have trees, where the base of the tree is in one layer, the top of the tree is in another and the collision (just on the base) is in a 3rd layer. Everything works if the collision layer is visible, but I often work with the collision layer hidden and when it is, I can’t stamp (or see) the entire brush if it effects the hidden layer.

It would be OK (for me) if I just didn’t see the part of the brush going to the hidden layer.

Hmm, in fact, the behavior currently is such that when the current layer is hidden, the brush is hidden as well and you can’t paint. This behavior is in place because in the past, using the brush on a hidden layer would appear to not do anything, so accidental clicks went unnoticed until it was too late to undo them.

So, you can have your collision layer hidden, as long as it is not your currently selected layer the multi-layer brush will work as you want (except, it won’t hide the parts that go to hidden layers, but I’m not sure that would be desired anyway).

I could imagine to change this behavior, so that the brush works whenever at least one of its target layers is not invisible, though that will be a little involved. Do you think that would be intuitive?

Hmm, I’ve tried to implement this for a bit, but then it occurred to me that the stamp could be randomly chosen from multiple variations, and each variation may have different target layers. So maybe I would need to take the union of all the targets layers of all the variations…

Ah, don’t you just love it when different features mix together to form a complicated mess of edge-cases! :slight_smile:

@Ron1987 I’ve made the following change, let’s hope it improved the situation (will be in next development snapshot):