SC2Mapster Forums

Resources > Trigger Libraries & Scripts

[Library] Hero Selection v3.0.1 Final

    #1 Aug 11, 2010 at 09:15 UTC - 0 likes

    Dynamic Hero Selection Library.

    Current version: 3.0.1 Final - only bug-fix releases coming up

    A very easy to use library with plenty of options. Simply add it to your map, whip in a few heroes and BAM you got yourself a beautiful, full featured hero selection.

    Features

    • Completely modular - add any amount of units to the selection
    • Extremely easy to use - simply call the action
    • Based on a single point in the map
    • Shows icons for all units
    • Identifies randoming players
    • Repick option
    • Custom UI
    • Settings - most notably:
      • Three different hero selection styles
      • Skin Color Scheme
      • Exclusive Heroes - Allows every unit to be picked only once
      • Spawn Immediately - Allows players to start the game before hero picking is finished
      • Secret Heroes - Only obtainable through randoming
      • Unavailable Heroes - Shown in circle but cannot be obtained
    • And many small things...

    How to use

    NOTE: Action Hint Texts do not show due to a bug - go into Library View (View -> Show Library), open libCircleHeroSelection, open the Actions folder and you can read the hint text in the comment of the action.

    1. Download the latest file and import it in the Trigger Editor. View -> Library -> Import Library. You can now see the available actions in your triggers under the label 'Circle Hero Selection'.
    2. Read the manual found in the download section
    3. Make sure you use 'Set Circle Hero Selection At Point'
    4. Then add any amount of heroes with 'Add Unit To Circle Hero Selection Pool'
    5. Now run the action 'Create Circle Hero Selection' Done! Don't forget to check out the additional options.

    Changelog

    v3.0.1 Final

    • Bugfixes:
      • Icon image no longer tiled
      • Exclusive random no longer says you repicked
      • Revealer time fixed in game speeds other than normal
      • No more unit models in portrait mode

    v3.0 Final

    • Optimized code & bug fixes
    • Added check to see if there are enough exclusive heroes for all players
    • Repick option added
    • Center Info dialog added
    • Removed player 0 requirement - now uses the first player in active players for sample heroes
    • Removed fidget from all sample heroes
    • Offset distance is now calculated based on the amount of heroes
    • Added 2 style types - Flash Screen & Portrait
      • Portrait requires no room in the map at all, purely dialog based
    • Added option to force small circle - useful for large amount of heroes because circle will keep expanding however this option will make it crowded
    • Currently selected hero icon highlighted
    • Single player detection - force Spawned Immediately on

    License

    Free to use and edit! Please give credit.

    Bugs / Assistance

    Please submit all bugs, as detailed as possible. Attached map greatly preferred. If you need help, ask away. IRC works faster.

    Suggestions

    At this point, feature development has come to a halt so I can start working on other projects. However, extremely good suggestions will still get implemented.

    Localization

    An SC2 Library cannot be localized at the moment. It will work with enGB / enUS clients. However Hint Text on Actions are missing due to a bug on Blizzards part. You can find these hint texts if you go into the Library View (View -> Show Library), open the Hero Selection Library folder and go into the Actions folder. Click on the function and you will see the hint text in a comment.

    Download

    Latest version can always be found in the files section of the project page. Be sure to read the manual.

    Last edited Aug 18, 2010 by SweetZombieJesus

    Hero Selection Library v3.0.1 Final - Completely free to use and edit. Create a beautiful, fully featured hero selection in seconds.

    #2 Aug 11, 2010 at 10:19 UTC - 0 likes

    Thanks sweetzombiejesus (lol)

    I was planning on having a selectable hero for my map and this will really help provided it works for my map.

    I will try it out. i'm sure you'll see it in action soon :)

    Creator of;
    Bungle Squats
    Obelisk Hellfire

    My Blog: http://www.face-gamers.com
    http://www.google.com/profiles/matthoey86

    #3 Aug 11, 2010 at 11:00 UTC - 0 likes

    I think i still have to set the cameras myself.

    also no units are spawning for me. Possible dependency problem?

    #4 Aug 11, 2010 at 11:07 UTC - 0 likes

    Ah ok had to run the spawn players too.

    Can you add em to msn messenger or skype?

    matthoey86@hotmail.com

    #5 Aug 11, 2010 at 11:18 UTC - 0 likes

    Just trying to figure out how I can make it so in the hero creation stage it will create a hero in the start location of the 8 players in my map.

    #6 Aug 11, 2010 at 11:23 UTC - 0 likes

    Pretty easy, made a slight change to spawn players trigger.

    Now I just need to make the cameras work properly

                    Unit - Create 1 Picked Hero[((Picked player) - 1)] for player (Picked player) at (Start location of player (Picked player)) using default facing (No Options)

    #7 Aug 11, 2010 at 11:49 UTC - 0 likes

    Script working perfectly for me now.

    Thanks a lot, i'm sure it will benefit the user experience of my map :)

    PS, what software did you use to record your video? Fraps?

    #8 Aug 11, 2010 at 12:23 UTC - 0 likes

    Yea fraps for recording

    Sorry I didnt respond to help :P Come to IRC for instant answer if im awake

    Ah and you made me realize i forgot the camera step in the first post :P

    Fixed now

    #9 Aug 11, 2010 at 13:01 UTC - 0 likes

    Really nice! I just put it into my map, took a lot of tweaking of the camera angle and such, but it finally works just how i want it.

    Just one question... Is it possible to limit the choice of heroes, so that if 1 player picks a hero, it is removed from the selection? Cause in my map i dont want 2 players to be able to have the same hero :( If you can't answer this, i'll try and play around with it a bit...

    In the beginning, the universe was created.
    This was regarded as a bad move and made a lot of people angry.
    email: mighty.maity@gmail.com , Twitter: @TheAlmaity
    http://farm8.staticflickr.com/7156/6673861319_b9dd7da737.jpg
    http://farm7.static.flickr.com/6208/6049547173_6340357230.jpg

    #10 Aug 11, 2010 at 13:42 UTC - 0 likes

    Made this for you libCircleHeroSelectionWithExclusiveHeroes

    Should work, did not test it in multiplayer

    Changes are all in the 'Camera Turning & Selection' trigger, towards bottom

    Enjoy

    Last edited Aug 11, 2010 by SweetZombieJesus
    #11 Aug 11, 2010 at 13:59 UTC - 0 likes

    Thanks! havent tested it out in multiplayer yet, but i will later once i re-upload the map with some fixes, etc. If you wonder which map it is, its Gates of Darkness, its uploaded here. Gonna add you into the credits right away... hope that blizzard wont kill me for your username xD

    Anyway, one problem is taht you have the wrong order for the if then else functions when selecting a hero. It will first set the varible "hero taken" to true, and THEN try to pick the hero, which will fail because of the condition... Moving the second if then else up makes it work again though :)

    #12 Aug 11, 2010 at 14:29 UTC - 0 likes

    Yea its like that so you cant pick the hero another player already has If you put the second if statement first, then the whole hero check thing is pointless, since the variable gets set after the hero has been picked, the local variable gets killed after the trigger ends

    I looked it over and it looks correct to me, maybe im too tired

    Anyway the multiplayer test reveals all

    #13 Aug 12, 2010 at 00:28 UTC - 0 likes

    Upon opening the original map and testing it, it works great. However, when I go into the triggers section, I get 8 "Warning: Orphaned trigger parameter removed from Function Call'Apply Camera Object' " etc messages and all the titles of triggers are blank, as well as the triggers themselves breaking. Might be a total noob mistake, but can anyone explain what's going wrong?

    #14 Aug 12, 2010 at 02:54 UTC - 0 likes

    @skyshatter0520: Go

    Odd, I had this problem too.

    #15 Aug 12, 2010 at 03:00 UTC - 0 likes

    Haha well at least it isn't just me I guess? Hopefully when SweetZombieZesus comes back online he can clarify this for us both.

    #16 Aug 12, 2010 at 03:32 UTC - 0 likes

    dropbox has been banned in my country for long times. I need to use VPN or SSH to access it.

    #17 Aug 12, 2010 at 05:35 UTC - 0 likes

    @SweetZombieJesus: Go

    its not working for me either, its all blank lables and 'no value.' you cant set the hero choices variables they're stuck as 'unknown' :( This is either a problem with our map editor or we had problems downloading the file, heres the wall of text of errors from the version with exclusive heroes

    Warning: Orphaned trigger function call removed: Function Call 'Triggering Unit' (Function Call, FC0652C8, Lib: 0) Warning: Orphaned trigger function call removed: Function Call 'Unit Type Of Unit' (Function Call, 8BDAD5D8, Lib: 0) Warning: Orphaned trigger function call removed: Function Call 'Triggering Unit' (Function Call, 4C03CEA2, Lib: 0) Warning: Orphaned trigger function call removed: Function Call 'Default Game Camera' (Function Call, 64669D63, Lib: 0) Warning: Orphaned trigger function call removed: Function Call 'Position Of Unit' (Function Call, 1922BE66, Lib: 0) Warning: Orphaned trigger function call removed: Function Call 'Default Game Camera' (Function Call, A180DDE7, Lib: 0) Warning: Orphaned trigger function call removed: Function Call 'Unit Type Of Unit' (Function Call, 5B6A61B8, Lib: 0) Warning: Orphaned trigger function call removed: Function Call 'Owner Of Unit' (Function Call, 21205E7D, Lib: 0) Warning: Invalid trigger element reference removed from Parameter Value 'Unknown' (Function Call, 21205E7D, Lib: 0) Warning: Invalid trigger element reference removed from Parameter Value 'Unknown' (Function Call, 1922BE66, Lib: 0) Warning: Invalid trigger element reference removed from Parameter Value 'Unknown' (Function Call, 8BDAD5D8, Lib: 0) Warning: Invalid trigger element reference removed from Parameter Value 'Unknown' (Function Call, 5B6A61B8, Lib: 0) Warning: Invalid trigger element reference removed from Parameter Value 'Unknown' (Function Call, 64669D63, Lib: 0) Warning: Invalid trigger element reference removed from Parameter Value 'Unknown' (Function Call, A180DDE7, Lib: 0)

    #18 Aug 12, 2010 at 07:35 UTC - 0 likes

    @SweetZombieJesus: Go

    I could definitely use something like this on my map. Much more work to do before I get up to that stage though. Hopefully I can come up with something different but equally cool.

    #19 Aug 12, 2010 at 07:56 UTC - 0 likes

    You just need to create a camera.

    For my map i didn't create a default camera, I selected the default game camera under functions(i think) and this makes the camera go to eahc players start location i think.

    #20 Aug 12, 2010 at 08:00 UTC - 0 likes

    @gorang: Go

    I definitely created the camera first. But the problem isn't isolated completely to my map, it even effects the author's map. Any other tips? Because the author's map DEFINITELY has a camera, as it works...UNLESS you press the triggers. Download the default library map, run it. Works fine, right? Now without modifying anything, open up triggers. You will see what I mean. Then try running it. Fail =( Help please haha.

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