Well the conditions for your "Get Money" scripts can be what you want. You can divide your map into areas and if player has control of area (for time delay), add 1 to area control counter. Then based on "area count" then cash is paid out.
I don't like making a recommendation without checking it our first, so I decided to play around with "Unit Values" in an area and getting paid if conditions are met. I had suggested adding and subtracting from a counter in my previous post and after a frustrating half an hour gave up on counters. They're just not reliable. Instead I went with spawning a marker unit as I find they work all the time.
So I just made one area on the map (you can add as many as you wish) and set the value in the area at 1000. This means that if the player has a unit value of 1000 or more in the area the marker unit is spawned. Again, you can set the value to what ever you wish but for testing, I needed to move two tanks into the area to trigger the script. If they have less than this amount in the area the marker is removed.
Even though I had only made one area for testing I wanted to give an example of how the payday scripts work so I scripted it for five areas. Once again, change this as needed. So how it works is it looks for the marker for the first area. If the marker is found it pays a cash amount (set for $100 in the sample). This script will then activate the next area script whether a marker is found or not. At the end of this run of scripts, is a delay script for setting the time between paydays. I set it for 3 seconds for testing.
In case that's not clear, it's going to run through these area scripts very fast and pay for every marker that is found for this player, then hit the delay script and start over. So the more areas the player controls, the bigger the payday.
Also Note: I only scripted paydays for two rooms or the first two player slots. All rooms should be scripted.
In case you're not sure about this type of scripting, it's all done in the PlyrCivilian folder and identifies players by the "Room" they start in. ("Rooms" are the slots found on the screen when starting a game where you pick your faction and assign teams, colors etc.) This type of scripting should be done for all eight rooms represented by player0 through player7.
In any case, this sample works well and as scripted, pays the player $100 every three seconds if he has a value of 1000 (two tanks) in the area. If he doesn't have the value in the area, he isn't paid.
TestValue.zip
(8kb) downloaded 2 time(s). Edited by user
17 years ago |
Reason: Double post splice