1. Home
  2. Tutorials
  3. Auto layers
  4. Rules

Rules

Editing a rule

Rules are grid patterns that will decide if a specific tile should be painted on your layer.

To open the rule editor:

Grass

Here is a simple rule:

It says “Paint the tile if” :

  1. in any given cell, there is a “walls” IntGrid value (white)
  2. AND there is nowalls” value above.

Dirt

And here is another one:

This second one means: “Paint the tile if any given grid cell contains a “walls” value“.

Testing the rules

We should now have the following rules:

If you paint “walls” values to your IntGrid layer, the tiles will be drawn automatically:

Seeing actual data

If you press R key (or uncheck the Render option) in the Rules panel, you will see the “pure” IntGrid layer, without the tiles: