• 0

    posted a message on 10x1 Command Card and Resized Inventory - How to do this?

    https://www.sc2mapster.com/forums/development/ui-development/165538-sc2layout-snippits?comment=11

     

    The linked file in this comment is not available in, and I'd like to do this. How can it be done?

    Atleast the command card moved and only showing 10x1.

     

    Oh.. Found it in a post below, didnt realise that was it. This is solved.

    Posted in: UI Development
  • 0

    posted a message on Spawning units into an a Region

    One method I can think of, is to monitor when a unit is build, then add it to a unit group. Then pick each unit in the unit group and spawn a unit of the unit type of picked unit in the region you want.

    Something like that. When a unit is finished constructing, add finished unit to unit group. If the unit uses a "Sell" ability, remove it from unit group.

    Posted in: Triggers
  • 0

    posted a message on Display total experience, not levels

    If you set a unit's death time to -1 and use a revive action, it will retain it's exp and levels (even though you don't need it),

    Posted in: Data
  • 0

    posted a message on how to randomize teams

    You can have an Integer global variable, with an array of 12.

    Then you put all players in a player group at the start of the game, and pick each player in the player group and set IntegerVariable[Picked Player] to an increasing value.

    something like this

    Set X = 1
    Repeat 12 times
      Set IntegerVariable2 = Random Player from Playergroupwithallplayers
      Set IntegerVariable[Integervariable] to X
      Modify X + 1
      Remove IntegerVariable2 from playergroupwithallplayers
    

    Then instead of using triggering player (or whatever you need) in your map, you use IntegerVariable[Triggering Player]

    Posted in: Triggers
  • 0

    posted a message on Heroes of the Storm Gates

    @DrSuperEvil: Go

    Oh, totally forgot to explain my thought process on that part.

    Make the blocker units have a collision type such as forcefield (don't use forcefield, use something your units that should be able to pass does not have) and then you can have players on team 1 have units which does not collide with those blocker units, and players on team 2 the oposite.

    This might need a Team 1 version and a team 2 version for each unit. I don't know if you can modify collision types with triggers.

    Posted in: Data
  • 0

    posted a message on Heroes of the Storm Gates

    Othervise you could create a line of invisible units in a line where the gate should block, and have a trigger remove them when the gate is destroyed.

    Posted in: Data
  • 0

    posted a message on Stim Packs

    I think you need to explain what you've done so far. What do you mean by "put the stim pack in the tech lab"?

    Did you add the research ability and command card button? Or did you create an all new research ability and stim pack ability? What do you mean by the Thor not showing it, but being able to use it? We need more context to be able to help you :)

    Posted in: Data
  • 0

    posted a message on Any way to detect CLAN name and branch?

    What exactly do you mean by clanname? If the players name is ClanNameRohime then do X actions? Please elaborate what you mean by clan?

    Posted in: Triggers
  • 0

    posted a message on Order command won't work? [Bugfix]

    @Ari2010: Go

    In your first image, you are using Created Unit. That does not seem to refer to anything. You probably want to use Picked Unit.

    Posted in: Triggers
  • 0

    posted a message on Ability added but unavailable in game

    Just a wild gues, does the ability have a requirement set in the commands field or in the command card of the owning unit?

    Posted in: Data
  • 0

    posted a message on I need to replace hero health bars using Data instead of Triggers

    @greythepirate: Go

    True. I'm no wizard in the UI editor sadly, and that part of sc2mapster seems to be pretty dead sadly :/ Would love to learn how to create it though.

    Anyway, you're completely right :)

    Posted in: Data
  • 0

    posted a message on I need to replace hero health bars using Data instead of Triggers

    @onlyleviathan: Go

    It's my experience that using a repeat action creates less lag, than having a trigger like that. I've made a trigger that is run at the start of the map, which repeats forever. The repeat action has an if/then/else action, which checks if a Unit Variable is empty, if not, set a dialog item to the health pf the variable unit.

    Then I have a 0.1 wait in the end of the repeat action.

    This runs pretty smooth for me.

    Hero Panel Update
        Events
            Game - Map initialization
        Local Variables
            X = 0 <Integer>
        Conditions
        Actions
            General - Repeat (Actions) forever
                Actions
                    Player Group - Pick each player in (Active Players) and do (Actions)
                        Actions
                            General - If (Conditions) then do (Actions) else do (Actions)
                                If
                                    Active Hero[(Picked player)] != No Unit
                                Then
                                    Dialog - Set Hero Panel - Shields Bar size to ((Integer((205.0 * ((Active Hero[(Picked player)] Shields (Percent) (Current)) / 100.0)))), 14) for (Player group((Picked player)))
                                    Dialog - Set Hero Panel - Health Bar size to ((Integer((205.0 * ((Active Hero[(Picked player)] Life (Percent) (Current)) / 100.0)))), 24) for (Player group((Picked player)))
                                    Dialog - Set Hero Panel - Energy Bar size to ((Integer((205.0 * ((Active Hero[(Picked player)] Energy (Percent) (Current)) / 100.0)))), 14) for (Player group((Picked player)))
                                    General - If (Conditions) then do (Actions) else do (Actions)
                                        If
                                            (Active Hero[(Picked player)] Shields (Current)) <= 1.0
                                        Then
                                            Dialog - Hide Hero Panel - Shields Bar for (Player group((Picked player)))
                                        Else
                                            Dialog - Show Hero Panel - Shields Bar for (Player group((Picked player)))
                                    General - If (Conditions) then do (Actions) else do (Actions)
                                        If
                                            (Active Hero[(Picked player)] is alive) == False
                                        Then
                                            Dialog - Hide Hero Panel - Shields Bar for (Player group((Picked player)))
                                            Dialog - Hide Hero Panel - Health Bar for (Player group((Picked player)))
                                            Dialog - Hide Hero Panel - Energy Bar for (Player group((Picked player)))
                                        Else
                                            Dialog - Show Hero Panel - Health Bar for (Player group((Picked player)))
                                            Dialog - Show Hero Panel - Energy Bar for (Player group((Picked player)))
                                Else
                    General - Wait 0.1 Game Time seconds
    

    My map has a custom healthbar in the top corner like in the campain, thus the adjustment of size.

    And if you really wan't to reduce lag, you can use this instead of Pick each player in as it creates less lag than calling a player group and so on.

            General - Repeat (Actions) 10 times
                Actions
                    ------- YOUR ACTIONS
                    Variable - Modify X: + 1
    

    EDIT: Attached a demo map.

    Posted in: Data
  • 0

    posted a message on Change CD of the ability of an item

    @Kloupz: Go

    What events exactly do you want to disable the use of the item (I assume you mean like give an error such as "Caster if full health")?

    Try to explain it further, and we might be able to help. It's hard to help when I don't know what you want :)

    Posted in: Triggers
  • 0

    posted a message on UI: Error in custom SC2Layout

    @FunkyUserName: Go

    Thank you!

    I removed the Desc files in the UI folder, and it removed the error.

    Posted in: UI Development
  • 0

    posted a message on How to add Kerrigan's hero health bar and health bar and icon in corner

    A Variable is like a box, the type of the variable is the shape of the box. So a Unit type variable can store unit types, an Integer variable can store integers and so on.

    There are two types of variables, Global and Local. A Global variable is the ones that are created and listed among the triggers, and the local ones are the ones created in the individual triggers. A global variable can be called in all triggers, and a local can only be called in the one it has been made.

    If you create a unit, you can set a Unit, Global variable to Last created unit and later on refer to that variable to refer to the unit.

    Also Variables can have arrays (sub parts of the variable), which can look like this GlobalVariable1[0]. This allows you to set your Unit variable to UnitVariable[Owner of(Last Created Unit)] = Last Created Unit for each player, and then later be able to refer to the individual units for each player.

    Arrays also have dimensions, so you can have a variable look like this GlobalVariable[0][0]. A way to look at it, is to imagine it as a checker board, or a coordinate system, so 0,0 is field, 0,1 another field with a different value, 1,0 a third value, and so on. I hope it makes sence, othervise I'll try to explain it further.

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