• 0

    posted a message on Dynamic Equipment Container Model ?

    @InfamousBus: Go

    well the easiest to implement solution is just to make duplicates of the inventory for each hero, and duplicates of the ability as well. so each hero has it's own inventory and ability.

    now the hard way to do this is using catalogs to set the value correctly per player.
    well you've actually got it there already: Catalog Set Value of Item Containers for EquipmentContainer Model Model of Triggering Unit.

    It will prolly end up like this though:
    Catalog - Set value of Item Containers "EquipmentContainer" "Model" for player (Triggering player) to (String((Unit type of (Triggering unit))))

    Posted in: Miscellaneous Development
  • 0

    posted a message on [Trigger] Default Minimap and Commandcard outside the default UI

    @s3rius: Go

    http://www.sc2mapster.com/assets/dialog-item-templates/ <== now as an asset with more then what I've listed above.

    Posted in: Tutorials
  • 0

    posted a message on Modifying inventory icons ???

    @MisterTeaRealOne: Go

    I haven't gotten right click events to work. but what I do have working are left click and double click events. left click is move around, double click is use item if possible.

    Posted in: Miscellaneous Development
  • 0

    posted a message on [Trigger] Default Minimap and Commandcard outside the default UI

    you can get the default minimap and commandcard outside of the default UI using Dialog Items.

    Yes, many people have made their own minimap designs, command card designs.
    I on the other hand didn't bother with that, and found a way to get the minimap working outside of the default UI.
    Here is the Minimap line:

    Dialog - Create a Image for dialog (Last created dialog) using the template "MinimapPanel/MinimapPanelTemplate"

    And here the CommandCard one:

    Dialog - Create a Image for dialog (Last created dialog) using the template "CommandPanel/CommandPanelTemplate"

    and here is an image with them outside there UI:


    ok now for some more code to make it completely copy&paste stuff.

            Dialog - Create a Modal dialog of size (400, 400) at (0, 50) relative to Top Right of screen
            Dialog - Create a Image for dialog (Last created dialog) using the template "MinimapPanel/MinimapPanelTemplate"
            Dialog - Set (Last created dialog item) size to (400, 400) for (All players)
            Dialog - Hide the background image of (Last created dialog)
            Dialog - Show (Last created dialog) for (All players)
            Dialog - Create a Modal dialog of size (445, 285) at (0, 0) relative to Bottom Right of screen
            Dialog - Create a Image for dialog (Last created dialog) using the template "CommandPanel/CommandPanelTemplate"
            Dialog - Set (Last created dialog item) size to (400, 400) for (All players)
            Dialog - Move (Last created dialog item) to (27, 27) relative to Top Left of dialog for (All players)
            Dialog - Show (Last created dialog) for (All players)
    

    now for the galaxy code

            DialogCreate(400, 400, c_anchorTopRight, 0, 50, true)
            DialogControlCreateFromTemplate((DialogLastCreated()), c_triggerControlTypeImage, "MinimapPanel/MinimapPanelTemplate")
            DialogControlSetSize((DialogControlLastCreated()), (PlayerGroupAll()), 400, 400)
            DialogSetImageVisible((DialogLastCreated()), false)
            DialogSetVisible((DialogLastCreated()), (PlayerGroupAll()), true)
            DialogCreate(445, 285, c_anchorBottomRight, 0, 0, true)
            DialogControlCreateFromTemplate((DialogLastCreated()), c_triggerControlTypeImage, "CommandPanel/CommandPanelTemplate")
            DialogControlSetSize((DialogControlLastCreated()), (PlayerGroupAll()), 400, 400)
            DialogControlSetPosition((DialogControlLastCreated()), (PlayerGroupAll()), c_anchorTopLeft, 27, 27)
            DialogSetVisible((DialogLastCreated()), (PlayerGroupAll()), true)
    

    There are more Templates available and I might be adding them at some other time to this post.

    Posted in: Tutorials
  • 0

    posted a message on Hide Inventory Button

    I've created a custom inventory but I still need some of the default inventory functionality for several of my items.
    So what I want is to hide the inventory button.
    You see the little square standing above the command card, that's the one that I want to get rid off.

    Yes I know it ain't there when the unit is not selected, but when the unit is selected I don't want it to be there either.
    For those who want to know how I created that Commandcard and Minimap I'll post it somewhere the coming week on the forums, or you can ask me on IRC and I'll give it to you.

    Posted in: Miscellaneous Development
  • 0

    posted a message on LibActionBar
    Quote from MotiveMe: Go

    I'd like to thank Helral for helping me figure out how to access the very stupid catalogs without causing errors all over the place.

    No problem :)

    Posted in: Triggers
  • 0

    posted a message on For loop e_arrayIndexOverflow

    you can enable a trigger debugger at:
    File ==> Preferences ==> Test Document.
    [v] Run Game In A Window
    [v] Show Trigger Debugging Window

    Next you can use Debug Message to throw messages to that window when testing XD.
    This might help you find it out faster next time.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Dynamic Leaderboard Icons

    ok, just tested it and it was giving an error, as you said.

    I've included my test map here.
    If you run it and type -spawn <UnitName> then it will create an unit and also display the last created unit in the leaderboard, with text and icon.
    example: -spawn Marine

    Although I can't see what is wrong with what I typed earlier, I've made it into a function that you can copy from the included map and paste in your map. you can then just call that function to retrieve the UnitIcon.

    This only works when the Actor is the same as the Unit, It might need some altering when that isn't the case. But for all default units it will work.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Dynamic Leaderboard Icons

    @thewightnish: Go

    hmmm I'll go test it out, I'll throw in a map with my next reply, so you can see what I did.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Sort leaderboard by kills (or any other number)

    @Fropper: Go

    Leaderboard - Sort (Last created leaderboard) by column 1, in Ascending order, with priority 1 <== that action would suffice I'd say.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Issueing Order "Move" dissapeared?

    @DirtyDevious: Go

    it didn't disappear, your order is: order without a target.
    change the order to "Order targeting point" and the move order will be there.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Arrays or Presets??

    @Sumsin: Go

    Players are numbers. so you can simply use arrays like:
    Set PlayerUnit[Triggering Player] = Last Created Unit.
    or if you create an unit per player:
    Set PlayerUnit[1] = Elf(123,123)
    The Elf at coördinates 123,123 is used for player 1

    then you can use that PlayerUnit variable in other triggers where you have a player.

    for example:
    Event - Any Player presses W down
    Action - Issue order (Halt Position) to PlayerUnit[Triggering Player] (you get the idea XD)

    Posted in: Miscellaneous Development
  • 0

    posted a message on Dynamic Leaderboard Icons

    @thewightnish: Go

    You'll have to do some catalog work for it.

    I'd suppose a customscript like this would work:
    SetVariable(lv_unitIcon, (CatalogFieldValueGet(c_gameCatalogActor, (StringToText2((UnitGetType(lv_unit)))), "UnitIcon", c_playerAny)))

    I haven't tested that line though, it might give some errors.

    A Translation of what it does:
    SetVariable ==> the Set Variable function
    lv_unitIcon ==> the local variable named unitIcon (the type of this variable is Image(File) )
    CatalogFieldValueGet ==> this retrieves info from what you can set in the data editor.
    c_gameCatalogActor ==> this tells the CatalogFieldValueGet to look in the Actors catalog.
    StringToText2 ==> This one is a bit confusing. what it does isn't transforming a string to a text, but it transforms a gamelink to a string.
    UnitGetType ==> It retrieves the Unit Type gamelink of the given unit.
    lv_unit ==> the local variable named unit (the type of this variable is Unit)
    "UnitIcon" ==> the field that is read from the catalog. in this case it retrieves the UnitIcon.
    c_playerAny ==> which player's catalog should be read?, in this case it doesn't matter since all the players have the same data for what we're trying to retrieve.

    You'll need to customcode it because you want it to return a type of Image(File), and there is no conversion from string to Image(File), even though they're both just strings.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Modifying inventory icons ???

    @MisterTeaRealOne: Go

    Well if I understand you correctly, you want to have items which are not 1x1 sized.
    See this youtube movie as to what I think you mean:

    Embed Removed: https://www.youtube.com/v/gpSHni56zFg?fs=1


    That inventory system is made with Dialog Items.

    I don't know of any way to make the default SC2Inventory slots larger.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Easy problems

    @HeyRevolver: Go

    1) owner of triggering unit != Number of Neutral player <== condition

    2) use last created unit instead.

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