| 04-18-2003, 10:24 PM | #1 |
This question is horribly difficult to word, and my brain fries when i try to find a solution to making this work properly. Even the best need help at their work sometimes, and i need a bit of help on a reliable way of conquering this problem. Here it goes: As you know, one of the rules in monopoly is to buy houses for properties in an EVEN manor, meaning: you must have at least 1 house on all properties of ONE color group in order to start building 2 on each. Same applies to moving up to building 3 houses on each, and so forth. In order to make explaining this as easy as possible, i'll not relate it to monopoly- better yet, it will refer to a very simple basic scenario: Lets say you have 3 regions. In each region, you may only have a maximum of 4 towers. In order to have 2 towers on ONE of those regions, you must have at least 1 tower already built on each of the 3 regions. In order to have 3 towers on ONE of those regions, you must have at least 2 towers already built on each of the 3 regions, same applies with 4. Below the 3 regions, are 3 circles of power. Each of these circles of power represent one of the 3 regions above them. If one of the regions corresponding to a certain circle of power is not eligible to build on according to the rules i've mentioned above, then its circle of power will be given 75% transparency to let the player know that you can NOT build on that property until you have an even number of towers on all 3 of the regions. Yet, if one of the regions has a lower or equal amount of towers compared to the other two regions, its corresponding circle of power will be given NO transparency to show that it qualifies to earn another tower. Still don't get it? Here's more examples about the same scenario: Region one has 1 tower, Region two has 0 towers, and region three has 0 towers. This means that Region one's circle of power will have 75% transparency, Region two's Circle of power will have NO transparency, and Region three's circle of power will have NO transparency. Region one has 3 towers, Region two has 3 towers, and Region three has 2 towers. This means that Region one's circle of power will have 75% transparency, Region two's circle of power will have 75% transparency, and Region three's circle of power will have NO transparency. Remember, NO transparency means that region can have more towers added to it... and 75% transparency shows that it cannot earn more towers until the other 2 regions earn the same number of towers that it has. Also take note, if regions one and two have 3 towers, and region three has 2 towers, if you add a new tower onto region 3, that means all 3 regions will now have 3 towers... meaning 4 may now be added to any region until all 3 have 4 towers, and since 4 is the max, no more towers may be built. This also means, since all 3 regions would have 3 towers, that all 3 of the circles of power will be non-transparent. I hope this is enough to grasp, but it blows my mind appart when i try to think of a way of making these things happen on my monopoly map exactly as i have explained them. I hope for a reply! Thanks everyone! |
| 04-18-2003, 11:30 PM | #2 |
Here this might be a solution, first create a region over each "color" of property (ex one over ParkPlace and Bordwalk) and add it to an array to make things easier, now have a trigger that finds when a player builds a "House". then just do a if...then to find out which "color" they added it to, and now run a sperate trigger [via Trigger-Run(...)] that will test the current number of houses on each piece of property in that color. If one happens to be greater than the one with the lowest amount then set the transparence of the Circle to 75% otherwise, set it to 0%. You will also have to test here if there is already the maximum number of houses on the property (4). With this solution, none of the Circles transparency will be set to 75% before until they "buy" a house. (If the "houses" aren't built, just spawned, then you will have to manually run this trigger every time a player "buys" a house. Whew....! |
| 04-19-2003, 01:09 AM | #3 |
See, the way houses are created work like this: There is a small section on the map called the Mini Board... this is a small replica of the larger monopoly map that players go to to buy houses. On the mini board, the circles of power represent the different spaces on the board. When a player clicks the circle of power, the space it represents is given a house. The transparency is simply there to let players know that a circle of power that has 75% transparency is NOT eligible for houses until the other properties gain more houses. Here is another scenario: It becomes my turn, and i click the dialog button that says "Buy Houses/Hotels. The camera then moves to the mini board in the middle of the map. At this moment the circles of power that represent the properties not eligible for houses are given 75% transparency, while the ones i am allowed to build on remain at 0% transparency. Lets say that boardwalk and parkplace i BOTH own have no houses on them, they would be non-transparent on the miniboard. I would click either of them and a house would be built on the space i clicked on. The one i just built the house on would become transparent now, and boardwalk would have to gain a house before they both become 0% transparent again. Do you understand now? It's a very complex method of purshasing households. I hope i may further gain assistance on this matter. Thank you for your reply MarSara, it's my fault for not giving the appropriate information. I hope i have given enough information now. Thanks again everyone! |
| 04-19-2003, 01:58 AM | #4 |
Actually MrDoomMaster, although it might be just because I am a programmer, but your method for purchising houses seems quite simple. ---------------------------------------------------------- Here are a few variables that might help out greatly: LotsOwned - Integer Array (or Player Array) HousesOwned - Integer Array - LotsOwned[0] = Player number of who ownes Baltic Ave. (or whatever is first square on map) - HousesOwned[0] = Number of houses owned on Baltic Ave. (to find who ownes the houses refer back to LotsOwned[]) ---------------------------------------------------------- Once they "Begin Buying houses", run a trigger (you will need one for each player), that checkes wether or not what complete lots they own, simple nested if...then... in a for...next... ,then setting the all the other circles to 75% (also disableing buy option). [You know at this point, arrays will become very helpfull] Then for the ones they do own compare the houses owned on that property with the others on that complete lot. Then just find the min value by doing Math-Min(...), and if any property of that color has a greater number of houses than the min, just disable the option to buy houses there and set the circle to 75% transparency, otherwise leve them at 0% transparency and keep the option enabled. Now, if they buy a house/hotel, just add 1 to HousesOwned[<property>]. (Hotel would equal 5) To disable/enable the buy option, just turn off/on the triggers that create houses/hotels. If you want the triggers for this, just ask and I will post them, they are quite simple. |
| 04-19-2003, 02:04 PM | #5 |
Thanks for your imput guys, but i figured out my own method FINALLY! |
| 04-19-2003, 02:27 PM | #6 |
good thing. that hurt my brain |
| 04-19-2003, 05:40 PM | #7 |
Guest | MarSara's method seems to be the best approach; perhaps a few bools can be added to avoid checks every time. On a side note, you (i.e. MrDoomMaster) seem to come off as a bit arrogant to me. It probably wasn't your intention, but the manner in which you refer to yourself as "the best" and the style of your explanations seemingly assuming low intellegence on the part of the reader does not make one motivated to help you. |
| 04-19-2003, 05:47 PM | #8 |
woo, that is comlicated. i kinda have a feeling that people arnt gona like ur map. cause when people start to loose, they leave:( stupid fukers |
