• 0

    posted a message on Lobby + Teams + Starting Locations

    @tmahring: Go

    Look at my lobby template. Lobby teams and start locations work with the triggers examples in the link below as long as the teams are balanced. If you try to setup a game where the teams are unbalanced then blizzards auto team balance function kicks in and you can't control teams or start locations for AI or players.

    http://www.sc2mapster.com/maps/bridgetest/files/6-lobby-template-sc2map/

    Posted in: Miscellaneous Development
  • 0

    posted a message on [Lobby/Game modes] The complete guide/reference
    Quote from adovid: Go

    Another thing I noticed is that if you set the map up to support uneven number of players on teams everything gets messed up. I don't know what to do about this :(.

    This is true, blizzard has a built in computer placement team balance thing going on. For instance if you setup a 4v4 game like this in the lobby.

    Team1
    Player1
    ComputerA
    ComputerB
    ComputerC

    Team2
    ComputerD

    What happens is blizzard forces a team balance. It switches back and forth plugging in computer players to the lowest populated team. There is no way to stop this.
    Player 1 will goto Team1.
    ComputerA will goto Team2 (This is caused by the AI forcing balance and it just rotates between teams from here on out until it runs out of computer players)
    ComputerB will goto Team1.
    ComputerC will goto Team2.
    ComputerD will goto Team1.

    Rule of thumb is never try to create a game that has unbalanced teams with specified start locations.

    Posted in: Tutorials
  • 0

    posted a message on Detecting teams with triggers impossible?
    Quote from Zero0018: Go

    Has anyone come up with a solution to this yet? I would really like to publish my map on bnet, but the team you pick from the lobby doesn't reflect in game...

    http://www.sc2mapster.com/maps/bridgetest/files/6-lobby-template-sc2map/

    Posted in: Miscellaneous Development
  • 0

    posted a message on [Lobby/Game modes] The complete guide/reference

    I finished a Lobby Template for anyone to use.

    It features in game lobby team detection and custom start locations based on lobby player color with working melee AI.

    Enjoy... this took many hours to figure out.
    http://www.sc2mapster.com/maps/bridgetest/files/6-lobby-template-sc2map/

    Posted in: Tutorials
  • 0

    posted a message on [Lobby/Game modes] The complete guide/reference

    I solved part of it. I am able to get the players lobby team now after a lot of custom scripting. Here is a function anyone can put in their map and it will tell you the players team they were on from the lobby. I still dont know if getting the team slot is possible.

    getPlayerTeam
        Options: Function
        Return Type: int
        Parameters
            varPlayerID = 0 <int>
        Grammar Text: getPlayerTeam(~varPlayerID~)
        Hint Text: (None)
        Custom Script Code
        Local Variables
            varPlayerTeam = -1 <int>
            varGameAttributeTeamCode = "" <string>
            varGameAttributeTeam = "" <string>
        Actions
            SetVariable(varGameAttributeTeam, GameAttributeGameValue("[bnet:Teams 08 (Mod)/0.0/999]2000"))
            Switch(varGameAttributeTeam)
                cases
                    SwitchCase("t2")
                        actions
                            SetVariable(varGameAttributeTeamCode, GameAttributePlayerValue("[bnet:Teams 08 (Mod)/0.0/999]2011", lp_varPlayerID))
                    SwitchCase("t3")
                        actions
                            SetVariable(varGameAttributeTeamCode, GameAttributePlayerValue("[bnet:Teams 08 (Mod)/0.0/999]2012", lp_varPlayerID))
                    SwitchCase("t4")
                        actions
                            SetVariable(varGameAttributeTeamCode, GameAttributePlayerValue("[bnet:Teams 08 (Mod)/0.0/999]2013", lp_varPlayerID))
                    SwitchCase("t5")
                        actions
                            SetVariable(varGameAttributeTeamCode, GameAttributePlayerValue("[bnet:Teams 08 (Mod)/0.0/999]2014", lp_varPlayerID))
                    SwitchCase("t6")
                        actions
                            SetVariable(varGameAttributeTeamCode, GameAttributePlayerValue("[bnet:Teams 08 (Mod)/0.0/999]2015", lp_varPlayerID))
                    SwitchCase("t7")
                        actions
                            SetVariable(varGameAttributeTeamCode, GameAttributePlayerValue("[bnet:Teams 08 (Mod)/0.0/999]2016", lp_varPlayerID))
                    SwitchCase("FFA")
                        actions
                            SetVariable(varGameAttributeTeamCode, GameAttributePlayerValue("[bnet:Teams 08 (Mod)/0.0/999]2017", lp_varPlayerID))
                    SwitchCase("Cust")
                        actions
                            SetVariable(varGameAttributeTeamCode, GameAttributePlayerValue("[bnet:Teams 08 (Mod)/0.0/999]2018", lp_varPlayerID))
                    SwitchCase("t8")
                        actions
                            SetVariable(varGameAttributeTeamCode, GameAttributePlayerValue("[bnet:Teams 08 (Mod)/0.0/999]2019", lp_varPlayerID))
                    SwitchCase("t9")
                        actions
                            SetVariable(varGameAttributeTeamCode, GameAttributePlayerValue("[bnet:Teams 08 (Mod)/0.0/999]2020", lp_varPlayerID))
                    SwitchCase("t10")
                        actions
                            SetVariable(varGameAttributeTeamCode, GameAttributePlayerValue("[bnet:Teams 08 (Mod)/0.0/999]2021", lp_varPlayerID))
                    SwitchCase("t11")
                        actions
                            SetVariable(varGameAttributeTeamCode, GameAttributePlayerValue("[bnet:Teams 08 (Mod)/0.0/999]2022", lp_varPlayerID))
                    SwitchCase("t12")
                        actions
                            SetVariable(varGameAttributeTeamCode, GameAttributePlayerValue("[bnet:Teams 08 (Mod)/0.0/999]2020", lp_varPlayerID))
                defaults
            SetVariable(varPlayerTeam, (StringToInt((StringSub(varGameAttributeTeamCode, 2, 3)))))
            Return(varPlayerTeam)
    
    Posted in: Tutorials
  • 0

    posted a message on [Lobby/Game modes] The complete guide/reference
    Quote from devilesk: Go

    I have this same problem. How do you allow players to move from team to team and then know which team a player is on when you're working with triggers?

    I don't want to just lock it so the host is always player 1 and he's forced to be on team 1.

    I spent a weekend messing around with variants and triggers. I should have wrote them down as I learned how it worked but here is what I remember.

    1. A computer player in the lobby ignores start location assignments that you setup in player properties in galaxy when initialized with InitMeleeAI()
    I'm still trying to figure out how to initialize an AI to start at a specified location and still use the melee AI.

    2. Player numbers are not slot numbers. I think players get numbered as they join and may even skip if a player leaves and a new one joins. Best thing to do about player numbers is pretend they dont exist. They are completly useless unless you want to bind players to start locations and not let them move around in the lobby.

    3. There is no way to get what player is in what slot that I know of.

    4. Confusing things happen with slots left open. For example when you have a 4v4 map and you put 3 computers on team 2 and just yourself on team 1 you can forget about trying to figure out which player goes where. Also the AI just start going to random locations and random allies itself with the wrong team. Open slots = bad ai. So always fill the slots in the lobby or make a game variant that has the specific number of slots for what you want to do. Again OPEN SLOTS = BAD AI.

    5. Player colors are unique and they match in game with triggers. This is important because with any mode where there all players and no AI you can use player colors to set start locations. I've done this and it works. Then I just made the map preview picture show that purple starts at X. There is also the benefit of letting players select a temporary color to move out of the way for someone that wants the color you have. You need to create a failsafe though if a player picks a color you dont have tied to a start location.

    6. The player properties window, where you setup alliances and start locations is useless. I don't know if its bugged, but start locations and alliances don't work completly for AI. Melee AI will override player properties window and find the first available slots and start locations.
    Player properties = "what does my map allow"
    Game Variants = "a more specific mode of whats allowed"

    7. Header failures and failures to publish are caused by when you make a game variant that has something that allows players to select something that is not allowed in Player properties.
    For example if you change the player properties to force players 1-8 to Terran race and generate default modes in the game variants you will cause a error because you are allowing players to select their race in the game variants but your map player properties doesn't allow that. The same errors can be caused by not allowing colors or whatever. The easiest way to avoid publish errors is to allow everything in player properties and setup game variants as you wish.

    Todo:
    1. Figure out a way to detect lobby teams (this should be doable with alliance comparisons)
    2. Initialize an AI to a specified location
    There is some settown functions and initmeleeai for specific players but I havent figured out the sequence to get the ai going. They just stand there doing nothing.

    Posted in: Tutorials
  • 0

    posted a message on Aura not working on preplaced units

    @gizmachu: Go

    So my map will have potentially hundreds of aura towers. What is better performance wise a hundred towers firing periodic effects or a hundred towers with an autocast ability that only fires when a unit comes in range?

    How could I performance test that?

    Posted in: Miscellaneous Development
  • 0

    posted a message on Aura not working on preplaced units

    @gizmachu: Go

    So lets say we start with a copy of the senty unit. Copying the Guardian Shield Actor, the Sentry Actor, the GuardianShield Behavior and the 3 Guardian shield effects. I've seen a tutorial on aura creation with timers but I think this is a better way to do it. There has a to be a way to trigger the ability to fire when a unit comes in range of the sentry to give the unit that came in range of the sentry the guardian shield buff. The sentry unit could continously fire the ability at any units in range say every second or something and let the buff last 1.1 seconds. That way we are only firing events when units come in range of the "Sentry tower" instead of every .2 seconds even if there are no units in range.

    I just got to this line of thinking of how to handle auras though so I haven't have much time to work on it.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Aura not working on preplaced units

    Hello,

    I'm having trouble getting an aura behavior to work on a tower. If I place the tower using the terrain editor and load the map the towers show the behavior buff but any units that come near it don't get the buff. If I build the tower with a SCV then the units get the buff if they come in range. It's some type of initialization problem of the behavior but I can't figure it out. Anyone have any ideas?

    Posted in: Miscellaneous Development
  • 0

    posted a message on Build time not working on custom unit

    @soulwhip: Go

    Figured it out. The unit must have the build in progress ability in Units tab->Ability tab->CUnit_AbilArray to give a unit a build time.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Build time not working on custom unit

    Hello, I'm working on a custom building that has copied the terran bunker unit for the most part. The problem is when I change the build time for the SCV build ability->Abilities -> bunker2 -> Abilities - Info+ -> bunker2 -> Info - Time it doesn't work. I think it has something to do with the actor events not using a underconstruction model but I'm not sure. Is there some type of event required to give custom units a build time?

    Posted in: Miscellaneous Development
  • 0

    posted a message on destructible bridge ? any ideas?

    Hey Drak,

    I want the same thing so I've been messing around with the editor for a couple days. I'm completely new to the editor but this is what I have so far. It's close to what I want so I figured we could bounce ideas off each other to finish the concept up.

    To do list:
    Need help finishing the destructible bridge.
    To do list:
    1. Make the bridge swap the model to mar sara bridge destroyed on death so it becomes unpathable
    2. Make the bridge repairable - Done
    3. Make the bridge selectable - Done
    4. Figure out why the SCV is not auto-repairing the bridge - Done (SCV repair ability was not flagged for neutral units)
    5. Prevent the bridge from actually being destroyed so you can repair the mar sara destroyed model

    http://www.sc2mapster.com/maps/bridgetest/

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