Attributes are set on the catalog level. You can set them using the data editor - it's a field under Unit objects. I'm not sure if you can use Catalog Field Value Set to change them after map initialization, though. You could certainly try that.
This only affects the fog of war and is not the same thing as using a Revealer over a region. I assume your intention is to reveal the area where the building is dying so everyone can see it. If so, create a Revealer over the dying building or Reveal the region for each player. There are a number of functions related to this.
It appears as if your trigger may be having problems as a result of the Wait function. Try disabling this function to see if it's the cause.
Another problem may be that the game might be unable to store the unit's identifier after its death and after the Wait time. To get around this, set a variable to something that indicates which team has won before your Wait function. For example, WinningTeam (local integer) = 1 for team 1's victory. Then reference that variable later when deciding what to do with each team at the end of the game.
Also, I'm not really sure what the purpose of restoring and unlocking the camera is since, by that point, all players should have been given either victory or defeat messages. O.o
I don't know. What I do know is that I manually changed the registry in the past for cross-region publishing, but now that shouldn't be necessary. However, for the sake of experimentation, I switched the registry entry to eu.logon.battle.net and it seems to have published just fine. O.o
Hello. I'm trying to publish one of my maps to Europe. I select Europe and Americas as regions when prompted during the Publish process in the editor. I get through the whole process including the file upload. Then in the "Publish Progress" window, it simply hangs at "Pending" for both regions. What am I doing wrong? :(
Right, but you could still put an artificial floor on the amount of time required to enumerate the points randomly to create more consistency, even if there is a small chance that the game may take longer to enumerate than your floor. The chances of the game being caught in an infinite loop looking for a valid point is practically nil for a 20% chance considering how quickly each loop iteration would occur. A certain type of philosopher might say that it's actually impossible given that there is a chance of validity at all ;)
The other thing is, if the Random Point in Region function fails to work properly, you may end up having to check the validity of the selected point anyway, bringing you back to square one.
A uniform distribution across the three regions should be fairly simple. You will need a boolean variable representing each region (I recommend an array of size 3.) Have the game select a random region and check if the respective boolean is FALSE: "if Region_Has_Been_Used[1] == FALSE" If that variable returns TRUE, randomly select one of the other regions and repeat until the spawn is executed or all three have been determined to be TRUE - in which case, set all three boolean variables to FALSE and repeat the spawning process from the beginning (this last part can be put in front of your other actions for maximum efficiency).
Set a variable to a random integer between 0 and 1. If 0, spawn <Contestant 1> at <Start Location 1> and then spawn <Contestant 2> at <Start Location 2>. If 1, Spawn <Contestant 1> at <Start Location 2> and <Contestant 2> at <Start Location 1>.
A unit has to be owned by some player. You can then change that player's alliance with other players. Allowing control is one of the options in the Set Alliance functions.
I could solve it by picking a random point in the region (where the creep should spawn) and then check if the point is within a circle around any player participating and if true select a new one. However if multiple (up to 8 ) players run around in the same region space to spawn might be hard to find. Hence selecting space where the unit can spawn becomes less likely than selecting points where it can't. This might hick-up the spawner, which could lead to a problem, as I am doing all spawning via one Trigger with lots of functions.
The second reason is that I have multiple regions. However each creep may only spawn in a different set of regions. So to select the point where it spawns I have to take a random Point out of all regions in the set.
This could be done by randomly selecting a region and after that a random point in the region. However I have no idea if the distribution over the space is still homogeneous.
If done correctly, I think this method would produce the best result. Regarding the first reason you gave, subtracting the region will not likely reduce performance significantly since all you are doing when trying to find a spawn point is changing the coordinates of a point variable until it meets the criteria you are looking for. This is almost certainly going to use fewer resources than forcing the game to change the size and shape of complex regions every 0.10 seconds or so.
A random distribution will never be necessarily homogeneous, only statistically homogeneous. It could happen, for example, that a random selection of regions would choose only one out of three regions over the course of the entire game. Over the course of 10,000 games, however, all three regions should be relatively equal in the number of units spawned.
If you want to force all of the regions to have an equal distribution every game, you'll have to count the number of units spawned in each one, then use those counts as conditions in your spawn event. For example, you can check to see if the difference between the (number of units spawned in region 1) - (number of units spawned in region 2) > 10. If true, don't allow units to spawn in region 1. This example would prevent region 1 from spawning any more than (the number of units spawned in region 2 + 10).
If you aren't already familiar with functions and action definitions, I suggest you learn what these do. They could save you a lot of time when developing a spawning system like this.
As Millie said, you basically have to restrict handling variables that reference players to functions that can be qualified beforehand with a conditional check. i.e.:
0
@merrillphish: Go
Attributes are set on the catalog level. You can set them using the data editor - it's a field under Unit objects. I'm not sure if you can use Catalog Field Value Set to change them after map initialization, though. You could certainly try that.
0
@Torch89890: Go
Any time :)
0
@Torch89890: Go
The sub function is 'Units In Region Matching Condition.'
0
First, this function:
This only affects the fog of war and is not the same thing as using a Revealer over a region. I assume your intention is to reveal the area where the building is dying so everyone can see it. If so, create a Revealer over the dying building or Reveal the region for each player. There are a number of functions related to this.
It appears as if your trigger may be having problems as a result of the Wait function. Try disabling this function to see if it's the cause.
Another problem may be that the game might be unable to store the unit's identifier after its death and after the Wait time. To get around this, set a variable to something that indicates which team has won before your Wait function. For example, WinningTeam (local integer) = 1 for team 1's victory. Then reference that variable later when deciding what to do with each team at the end of the game.
Also, I'm not really sure what the purpose of restoring and unlocking the camera is since, by that point, all players should have been given either victory or defeat messages. O.o
0
Star Bar: Now available in Europe!
0
@SoulFilcher: Go
I don't know. What I do know is that I manually changed the registry in the past for cross-region publishing, but now that shouldn't be necessary. However, for the sake of experimentation, I switched the registry entry to eu.logon.battle.net and it seems to have published just fine. O.o
0
Version 1.5 is here!
Version 1.5
0
Hello. I'm trying to publish one of my maps to Europe. I select Europe and Americas as regions when prompted during the Publish process in the editor. I get through the whole process including the file upload. Then in the "Publish Progress" window, it simply hangs at "Pending" for both regions. What am I doing wrong? :(
0
@FirefoxMetzger: Go
Right, but you could still put an artificial floor on the amount of time required to enumerate the points randomly to create more consistency, even if there is a small chance that the game may take longer to enumerate than your floor. The chances of the game being caught in an infinite loop looking for a valid point is practically nil for a 20% chance considering how quickly each loop iteration would occur. A certain type of philosopher might say that it's actually impossible given that there is a chance of validity at all ;)
The other thing is, if the Random Point in Region function fails to work properly, you may end up having to check the validity of the selected point anyway, bringing you back to square one.
A uniform distribution across the three regions should be fairly simple. You will need a boolean variable representing each region (I recommend an array of size 3.) Have the game select a random region and check if the respective boolean is FALSE: "if Region_Has_Been_Used[1] == FALSE" If that variable returns TRUE, randomly select one of the other regions and repeat until the spawn is executed or all three have been determined to be TRUE - in which case, set all three boolean variables to FALSE and repeat the spawning process from the beginning (this last part can be put in front of your other actions for maximum efficiency).
0
@CaptainIndustry: Go
Refer to this post:
Worker auto-harvest
0
@CaptainIndustry: Go
Here's what you can do post-initialization:
Set a variable to a random integer between 0 and 1. If 0, spawn <Contestant 1> at <Start Location 1> and then spawn <Contestant 2> at <Start Location 2>. If 1, Spawn <Contestant 1> at <Start Location 2> and <Contestant 2> at <Start Location 1>.
In psuedocode it might look something like this:
0
@joemart06: Go
A unit has to be owned by some player. You can then change that player's alliance with other players. Allowing control is one of the options in the Set Alliance functions.
0
If done correctly, I think this method would produce the best result. Regarding the first reason you gave, subtracting the region will not likely reduce performance significantly since all you are doing when trying to find a spawn point is changing the coordinates of a point variable until it meets the criteria you are looking for. This is almost certainly going to use fewer resources than forcing the game to change the size and shape of complex regions every 0.10 seconds or so.
A random distribution will never be necessarily homogeneous, only statistically homogeneous. It could happen, for example, that a random selection of regions would choose only one out of three regions over the course of the entire game. Over the course of 10,000 games, however, all three regions should be relatively equal in the number of units spawned.
If you want to force all of the regions to have an equal distribution every game, you'll have to count the number of units spawned in each one, then use those counts as conditions in your spawn event. For example, you can check to see if the difference between the (number of units spawned in region 1) - (number of units spawned in region 2) > 10. If true, don't allow units to spawn in region 1. This example would prevent region 1 from spawning any more than (the number of units spawned in region 2 + 10).
If you aren't already familiar with functions and action definitions, I suggest you learn what these do. They could save you a lot of time when developing a spawning system like this.
0
What isn't working about it? Is it not spawning marines at all?
0
@Elmaex: Go
As Millie said, you basically have to restrict handling variables that reference players to functions that can be qualified beforehand with a conditional check. i.e.:
Alternatively, you could run a conditional check this way:
A bit circuitous, maybe, but there you go.