• 0

    posted a message on How do you set a Unit's Attribute ei. Armored, Bio

    @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.

    Posted in: Triggers
  • 0

    posted a message on How do I get this

    @Torch89890: Go

    Any time :)

    Posted in: Triggers
  • 0

    posted a message on How do I get this

    @Torch89890: Go

    The sub function is 'Units In Region Matching Condition.'

    Posted in: Triggers
  • 0

    posted a message on [Solved] Game end action won't work

    First, this function:

    Visibility - Change visibility for player (Picked player) to Explored within Base 1 and Do Not check cliff level  // And this doesn't :(
    

    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

    Posted in: Triggers
  • 0

    posted a message on Star Bar Feedback

    Star Bar: Now available in Europe!

    Posted in: Map Feedback
  • 0

    posted a message on Multi-Region Publishing?

    @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

    Posted in: Miscellaneous Development
  • 0

    posted a message on Star Bar Feedback

    Version 1.5 is here!

    Version 1.5

    - Increased movespeed of supply trucks from 1.25 to 2
    - Added lots of neat icons and stuff
    - Cleaning now happens individually for each employee in real time instead of being processed at the end of each day
    - All Improvements and Improvement upgrades now cost 500 minerals
    - Added two more upgrade levels to the Defense Turret Improvement
    - Added a L3 perk for the Defense Turret: "Second Amendment"
    - Added the new Happy Hug Machine Improvement
    - Improvements now take up a slot and exclude other improvements in the same column
    - Increased the range of the standard base turret from 6 to 8
    - Miscellaneous bug fixes and improvements
    
    Posted in: Map Feedback
  • 0

    posted a message on Multi-Region Publishing?

    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? :(

    Posted in: Miscellaneous Development
  • 0

    posted a message on Merging / subtracting regions via triggers

    @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).

    Posted in: Triggers
  • 0

    posted a message on How do I randomize start locations?

    @CaptainIndustry: Go

    Refer to this post:

    Worker auto-harvest

    Posted in: Triggers
  • 0

    posted a message on How do I randomize start locations?

    @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:

    Set RandomStart = (random integer between 0 and 1)
    Switch depending on RandomStart
       Case 0
           Create 1 Command Center for Contestant[1] at Start_Location_1
           Create 1 Command Center for Contestant[2] at Start_Location_2
       Default
           Create 1 Command Center for Contestant[1] at Start_Location_2
           Create 1 Command Center for Contestant[2] at Start_Location_1
    
    Posted in: Triggers
  • 0

    posted a message on 2 or more players control same unit, NOT change ownership

    @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.

    Posted in: Triggers
  • 0

    posted a message on Merging / subtracting regions via triggers
    Quote from FirefoxMetzger: Go

    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.

    Posted in: Triggers
  • 0

    posted a message on 'And' in loop problem

    What isn't working about it? Is it not spawning marines at all?

    Posted in: Triggers
  • 0

    posted a message on Who is Player 16?

    @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.:

    If
       Unit_var is alive == True
    Then
       Send message to Player_var(Owner of Unit_var): You blowed up that thar unit!
       Kill Unit_var
    

    Alternatively, you could run a conditional check this way:

    If
       Owner of (triggering unit) >= 1
       Owner of (triggering unit) <= 4
    Then
       Send message to Player_var(Owner of (triggering unit)): You blowed up that thar unit!
       Kill (triggering unit)
    

    A bit circuitous, maybe, but there you go.

    Posted in: Triggers
  • To post a comment, please or register a new account.