SC2Mapster Forums

Development > UI Development

[Q] Non-clickalble Command buttons

  • 12 posts
    #1 Aug 27, 2012 at 10:07 UTC - 0 likes

    Hi, I am searching for an option to make the command buttons within the command panel non-clickable, but the assigned hotkeys shall still work and the command buttons shall be visible with their hotkey tag. What I want to do it's pretty much the same as in the official challenge named Advanced Command. (without the tooltips and stuff) So it should be possible by copy paste but I have no clue where to copy what to get it right. Help is pretty much appreciated because I am not so familiar with the SC2Editor.

    #2 Aug 27, 2012 at 19:28 UTC - 0 likes

    @Zulu23: Go

    trigger: Enable/Disable Command Type
    set it to buttons and there you go.

    in raw:
    trigger:UISetCommandAllowed
    disable: false
    commandOption: c_uiCommandAllowButtons
    playerGroup: PlayerGroupAll (or whatever group you want)

    Last edited Aug 27, 2012 by Helral: looked up exact trigger

    Helral's Lair
    Meow meoow meeow. I'm ze evil SC2MapsterKitten.

    UI Tutorials listing

    current projects:

    #3 Aug 27, 2012 at 21:50 UTC - 0 likes

    @Helral: Go

    yeah, that works... but with that there come two more issues....

    1st the unit info frame is also disabled for clicking. (the que isn't deletable anymore with a simple klick then and unselecting units off the selected group of units wont work as well)

    2nd all right click commands such as auto repair of scv's and mules won't work anymore...

    Is there a simple way to fix these two things?

    #4 Aug 28, 2012 at 07:51 UTC - 0 likes

    You could just place a dialog with a button on it that takes up the whole dialog over the command panel, then set the dialog's transparency to 100.

    This makes the buttons unclickable but hotkeys are usable and the buttons are visible. The only issue is that the buttons won't show a tooltip on mouseover.

    #5 Aug 28, 2012 at 09:26 UTC - 0 likes

    Didn't one of Blizzard's challenge maps have exactly what you ask for? You could look it up in the editor, as all maps Blizzard mape ara available in there and try to find, how they have done it.

    http://img577.imageshack.us/img577/4226/blaj.jpg

    #6 Aug 28, 2012 at 12:37 UTC - 0 likes

    @Kueken531: Go

    I tried to catch it how they done it for the "challenge" map, but I couldnt find it. Is well organized though, but seems to be hidden to me... It is for sure not done with the trigger disable/enable command type....

    Last edited Aug 28, 2012 by Zulu23
    #7 Aug 28, 2012 at 18:49 UTC - 0 likes
    Quote from Zulu23: Go

    @Helral: Go

    yeah, that works... but with that there come two more issues....

    1st the unit info frame is also disabled for clicking. (the que isn't deletable anymore with a simple klick then and unselecting units off the selected group of units wont work as well)

    I can unselect units (shift+click). so the unit info frame isn't disabled.
    Actions that are also listed in the command panel are indeed disabled like: remove an unit from the queue. (hotkey: esc, removes the last item in the queue)

    Quote from Zulu23: Go

    2nd all right click commands such as auto repair of scv's and mules won't work anymore...

    Is there a simple way to fix these two things?

    rightclick using keyboard: alt+hotkey
    well either you cannot use it at all or you can use it....
    The blizzard map probably uses a blizzard-map-only function...

    Last edited Aug 28, 2012 by Helral
    #8 Aug 28, 2012 at 21:34 UTC - 0 likes

    @Helral: Go

    Problems solved! Thank you.

    The maps are uploaded on EU servers and work as melee Hotkey trainers. Basically it's the ladder pool with disabled command buttons and the Green Tea Ai.

    Last edited Aug 28, 2012 by Zulu23
    #9 Aug 29, 2012 at 04:08 UTC - 0 likes

    @Zulu23:

    i know the problem is solved but i have an easier solution... go to the command card in the data editor and make the button 'passive' not 'ability'. now you can see the button but can not click on it. you can also read what the button does from the description. no need for triggers and all of that. lol.

    Field    Marauder
    Ability:         Face    Concussive Shells
    Field    Marauder
    Ability:         Type    Passive

    Like that.

    (yes i am nots good at this english part, LOL)

    #10 Aug 29, 2012 at 07:45 UTC - 0 likes

    @tdhsst: Go

    ok, thanks I'll give that a try

    #11 Aug 29, 2012 at 16:35 UTC - 0 likes

    @tdhsst: Go

    I tried to find what you explained, but I can't find a field to change from ability to passive. Could you possibly explain more detailed where I can find the field you would change?

    #12 Feb 19, 2013 at 20:22 UTC - 0 likes

    i suppose he mean making 2 buttons, assign them to 1 place and then use Hide Ability for active - then passive will be showed

  • 12 posts

You must login to post a comment. Don't have an account? Register to get one!