Jump to content
Sign in to follow this  
FeXoR

Need help with tile area placement

Recommended Posts

FeXoR    366

When I have a list of tiles for example tileList = [[23, 116], [23, 117], [65, 86]] is it possible to use the standard area/placers/painters/constraints methods to place terrain/hight/... on them?

As you can see the tiles in the list are not necessarily connected.

I can add them to a tile-class or place terrain and set hight manually but I want them only to be placed if constraints are ok so their placement has to check other tile-classes.

So it would already help if I could check the constraints of the other tile-classes.

I would be grateful if someone could help me with that.

I don't mind the notation like tileList = [x1, z1, x2, z2...] or whatever.

Share this post


Link to post
Share on other sites
FeXoR    366

You can do that I think. Painters are only dependent on an array of points no matter the number/placement.

Hm, ok.

Did this by:

var placer = new ClumpPlacer(1, 1, 1, 1, x, z);
var painter = [new TerrainPainter(terrainWood), new ElevationPainter(randFloat())]; // new TileClassPainter(clForest)
createArea(placer, painter);

for every single tile.

The TileClassPainter is commented out because he throws an error. (Not a problem for me cause I can add them by addToClass but in general it is)

A problem is that the SmoothElevationPainter does not work properly too. Even if I set height to 0 and no matter if I choose ELEVATION_MODIFY or ELEVATION_SET a single tile is alway very high on the left side (perhaps +10) and about half as high on the right.

However, it works with ElevationPainter as I did it manually.

Thx! Just needed a little motivation ^^

What happens if you place 2 clump placers at the same position when painting entities. Will there be 2 placed at the center of the same tile?

Edited by FeXoR

Share this post


Link to post
Share on other sites
Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoticons maximum are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×