TB2 - Week 6
This week nearly everything went through a major change. At first I tried to continue on with what I was working on from last week, this time spreading out the tiles evenly into a square grid shape.
Here is what happens if the user types 1 into the City Scale
This worked for the time being. However when I started trying to exponentially increase the city's scaling up process it became very tricky.
I settled on this for the moment as it did all I needed it to creating a small 2x2 grid of tiles.
The problems then came as I started trying to continue with the third. After getting help from a lecturer we reworked the system to make it a lot simpler as once I began selecting objects by name in order to move them it became extremely overcomplicated and required a lot of manual tweaking whereas I needed it to be a lot more automatic if I wanted the script to be open to changes.
Here we spaced out the lines to make each section a lot clearer. We also used an instance called block to make selecting the plane easier than needing to type in the tiles full name every time it needs to be selected e.g. "pPlane1".
2 for loops are then used to move each duplicate along the x and z axis depending on the city size inputted by the user for example if 7 is inputted, 50 tiles are created and then moved along in a 7x7 grid.
Finally we used the minValue, maxValue, and value attributes within the intFields in order to restrict the users ability to type absurd numbers into the window that could potentially breaking the system.
My Blog
Reading Time
Status | In development |
Category | Tool |
Author | up2122682 |
More posts
- TB2 - Week 10Mar 27, 2023
- TB2 - Week 9Mar 27, 2023
- TB2 - Week 8Mar 27, 2023
- TB2 - Week 7Mar 14, 2023
- TB2 - Week 5Feb 27, 2023
- TB2 - Week 4Feb 14, 2023
- TB2 - Week 3Feb 06, 2023
- TB2 - Week 2Jan 30, 2023
- TB2 - Week 1Jan 24, 2023
Leave a comment
Log in with itch.io to leave a comment.