From 62bdd2b431a01791728c1fd9c2a40fa75f5a6414 Mon Sep 17 00:00:00 2001 From: CJSatnarine Date: Sun, 31 Dec 2023 13:45:21 -0500 Subject: [PATCH] Change the maximum height of tree trunk --- GenerateTerrain.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GenerateTerrain.py b/GenerateTerrain.py index b8b5846..84f6560 100644 --- a/GenerateTerrain.py +++ b/GenerateTerrain.py @@ -52,12 +52,12 @@ def buildTree(): treeXPos = random.randint(0, xNum - 1) treeYPos = random.randint(0, yNum - 1) treeZPos = z - treeHeight = random.randint(3, 7) + treeTrunkHeight = random.randint(3, 5) # Add a single block as the location of the tree stump. # Loop through the treeheight to add a new cube as a chunk of the trunk. Add colour to the trunk. counter = 1 - while counter <= treeHeight: + while counter <= treeTrunkHeight: # Create the cube at that position. bpy.ops.mesh.primitive_cube_add(size = size, location = (treeXPos, treeYPos, treeZPos), scale = (size, size, size)) # Save the active object