System Easy Hero Selection!

XxShadyxX

I abused the rep system.
Reaction score
81
5 variables:eek:
5 Triggers (6 counting Optional Trigger):nuts:
Difficulty to make: Medium:thup:
Leaks: none:thup:
Bugs: NEVER!:D

1)Intro

2)What does it do?

3) Instructions:

4)Why use this?
A. Pros
B. Cons


XxShadyxX Hero Selection System!

Introduction:
This system is to help you with a more simpler and easier way of selecting a hero for a rpg/Arena type maps! This is all done in GUI. As you can probally see there are a few leaks but I bet you all know how to fix them.


What does it do?:
Ok so at the start of the game the camara rolls down to eye level at your starting location. Then it will create a hero for each player owned by that player. So how do I change the hero?:eek: You push the left and right arrow keys to cycle through the choices. When you push Left or Right Arrow keys it will replace the hero you see with the next hero or if you pushed left it will go to previous. Also It will automatically select the hero to look at the spells! So how do I choose the hero I want?:confused: Push the up arrow! This will reset your camara and disable the choosing.
This system is totally customizable like you can add a all random mode or a repick system.


Intructions:
First make a camera. Set the camera to Eye Level. Make It face North.(This is IMPORTANT) Ok then copy and paste it at each players start location.

Now we need some variables:
Variable name: Type: Size:
Heros Unit-type Array----- How many heros your going to use.

Camara_Veiw Camara Array----- The amount of camaras your using that are targeting each players start location.

Integer Integer Array----- Amount of players playing.


Unit Unit Group Array----- Amount of players playing.


Boolean Boolean Array----- Amount of players playing.

Ok so first make trigger named Initialization and follow the trigger:
INITIALIZATION

Code:
Initialization Copy
    Events
        Map initialization
    Conditions
    Actions
        Set Heros[1] = Paladin
        Set Heros[2] = Archmage
        Set Heros[3] = Mountain King
        Set Heros[4] = Blood Mage
        Set Heros[5] = Blademaster
        Set Heros[6] = Far Seer
        Set Heros[7] = Tauren Chieftain
        Set Heros[8] = Shadow Hunter
        Set Heros[9] = Death Knight
        Set Heros[10] = Lich
        Set Heros[11] = Dreadlord
        Set Heros[12] = Crypt Lord
        Set Heros[13] = Keeper of the Grove
        Set Heros[14] = Priestess of the Moon
        Set Heros[15] = Demon Hunter
        Set Heros[16] = Warden
        Set Heros[17] = Firelord
        Set Heros[18] = Pandaren Brewmaster
        Set Heros[19] = Pit Lord
        Set Heros[20] = Beastmaster
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Trigger - Add to Reselect <gen> the event (Player - (Picked player) Deselects a unit)
        Game - Display to (All players) for 10000000.00 seconds the text: |CFF0000EEChoose yo...
        Set Camara_View[1] = Camera 001 <gen>
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Set Point = ((Picked player) start location)
                Camera - Pan camera for (Picked player) to Point over 0.00 seconds
                Camera - Apply Camara_View[(Player number of (Picked player))] for (Picked player) over 1.00 seconds
                Set Integer[(Player number of (Picked player))] = (Player number of (Picked player))
                Unit - Create 1 Heros[1] for (Picked player) at Point facing Default building facing degrees
                Set Unit[Integer[(Player number of (Picked player))]] = (Last created unit)
                Selection - Select Unit[(Player number of (Picked player))]
                Set Group = (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True))
                Custom script:   call DestroyGroup (udg_Group)
                Custom script:   call RemoveLocation (udg_Point)
                Trigger - Turn on Right <gen>
                Trigger - Turn on left <gen>
                Trigger - Turn on Camara <gen>
                Trigger - Turn on Select1 Copy <gen>
                Trigger - Turn on Jump to Hero <gen>
                Trigger - Turn on DontMove <gen>
                Trigger - Turn on Reselect <gen>

This sets the starting camara view at each players start location and keeps them from moving the camara away.
CAMARA
Code:
Camara
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Boolean[(Player number of (Picked player))] Equal to True
                    Then - Actions
                        Do nothing
                    Else - Actions
                        Camera - Apply Camara_View[(Player number of (Picked player))] for (Picked player) over 0.00 seconds


This sets the right arrow change event. Right arrow= next hero.
RIGHT ARROW KEY
Code:
Right
    Events
        Player - Player 1 (Red) Presses the Right Arrow key
        Player - Player 2 (Blue) Presses the Right Arrow key
        Player - Player 3 (Teal) Presses the Right Arrow key
        Player - Player 4 (Purple) Presses the Right Arrow key
        Player - Player 5 (Yellow) Presses the Right Arrow key
        Player - Player 6 (Orange) Presses the Right Arrow key
        Player - Player 7 (Green) Presses the Right Arrow key
        Player - Player 8 (Pink) Presses the Right Arrow key
        Player - Player 9 (Gray) Presses the Right Arrow key
        Player - Player 10 (Light Blue) Presses the Right Arrow key
        Player - Player 11 (Dark Green) Presses the Right Arrow key
        Player - Player 12 (Brown) Presses the Right Arrow key
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                [COLOR="Blue"]Boolean[/COLOR][(Player number of (Triggering player))] Equal to True
            Then - Actions
                Do nothing
            Else - Actions
                Cinematic - Clear the screen of text messages for (Player group((Triggering player)))
                Set [COLOR="blue"]Integer[/COLOR][(Player number of (Triggering player))] = ([COLOR="blue"]Integer[/COLOR][(Player number of (Triggering player))] + 1)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        [COLOR="blue"]Integer[/COLOR][(Player number of (Triggering player))] Less than or equal to 20
                    Then - Actions
                        Unit - Replace [COLOR="blue"]Unit[/COLOR][(Player number of (Triggering player))] with a [COLOR="blue"]Heros[/COLOR][[COLOR="blue"]Integer[/COLOR][(Player number of (Triggering player))]] using The new unit's default life and mana
                        Set [COLOR="blue"]Unit[/COLOR][(Player number of (Triggering player))] = (Last replaced unit)
                        Selection - Select [COLOR="blue"]Unit[/COLOR][(Player number of (Triggering player))] for (Triggering player)
                        Game - Display to (Player group((Triggering player))) the text: (Name of [COLOR="blue"]Unit[/COLOR][(Player number of (Triggering player))])
                    Else - Actions
                        Unit - Replace [COLOR="blue"]Unit[/COLOR][(Player number of (Triggering player))] with a [COLOR="blue"]Heros[/COLOR][1] using The new unit's default life and mana
                        Set [COLOR="blue"]Unit[/COLOR][(Player number of (Triggering player))] = (Last replaced unit)
                        Selection - Select [COLOR="blue"]Unit[/COLOR][(Player number of (Triggering player))] for (Triggering player)
                        Set [COLOR="blue"]Integer[/COLOR][(Player number of (Triggering player))] = 1
                        Game - Display to (Player group((Triggering player))) the text: (Name of [COLOR="Blue"]Unit[/COLOR][(Player number of (Triggering player))])
                Unit - Pause [COLOR="blue"]Unit[/COLOR][(Player number of (Triggering player))]
This sets the Left Arrow Event. Left arrow= Previous Hero.


LEFT ARROW KEY
Code:
left
    Events
        Player - Player 1 (Red) Presses the Left Arrow key
        Player - Player 2 (Blue) Presses the Left Arrow key
        Player - Player 3 (Teal) Presses the Left Arrow key
        Player - Player 4 (Purple) Presses the Left Arrow key
        Player - Player 5 (Yellow) Presses the Left Arrow key
        Player - Player 6 (Orange) Presses the Left Arrow key
        Player - Player 7 (Green) Presses the Left Arrow key
        Player - Player 8 (Pink) Presses the Left Arrow key
        Player - Player 9 (Gray) Presses the Left Arrow key
        Player - Player 10 (Light Blue) Presses the Left Arrow key
        Player - Player 11 (Dark Green) Presses the Left Arrow key
        Player - Player 12 (Brown) Presses the Left Arrow key
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                [COLOR="blue"]Boolean[/COLOR][(Player number of (Triggering player))] Equal to True
            Then - Actions
                Do nothing
            Else - Actions
                Cinematic - Clear the screen of text messages for (Player group((Triggering player)))
                Set [COLOR="blue"]Integer[/COLOR][(Player number of (Triggering player))] = (Integer[(Player number of (Triggering player))] - 1)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                       [COLOR="blue"] Integer[/COLOR][(Player number of (Triggering player))] Greater than or equal to 1
                    Then - Actions
                        Unit - Replace [COLOR="blue"]Unit[/COLOR][(Player number of (Triggering player))] with a [COLOR="blue"]Heros[/COLOR][[COLOR="blue"]Integer[/COLOR][(Player number of (Triggering player))]] using The new unit's default life and mana
                        Set [COLOR="blue"]Unit[/COLOR][(Player number of (Triggering player))] = (Last replaced unit)
                        Selection - Select [COLOR="Blue"]Unit[/COLOR][(Player number of (Triggering player))] for (Triggering player)
                        Game - Display to (Player group((Triggering player))) the text: (Name of [COLOR="blue"]Unit[/COLOR][(Player number of (Triggering player))])
                    Else - Actions
                        Unit - Replace [COLOR="blue"]Unit[/COLOR][(Player number of (Triggering player))] with a [COLOR="blue"]Heros[/COLOR][20] using The new unit's default life and mana
                        Set [COLOR="blue"]Unit[/COLOR][(Player number of (Triggering player))] = (Last replaced unit)
                        Selection - Select [COLOR="blue"]Unit[/COLOR][(Player number of (Triggering player))] for (Triggering player)
                        Set [COLOR="blue"]Integer[/COLOR][(Player number of (Triggering player))] = 20
                        Game - Display to (Player group((Triggering player))) the text: (Name of [COLOR="blue"]Unit[/COLOR][(Player number of (Triggering player))])
                Unit - Pause [COLOR="blue"]Unit[/COLOR][Player number of(Triggering player)]
JUMP TO HEROOPTIONAL

This is to jump to the number you enter. What you can do is when the choosing starts you can make a message that lists all the heros and their numbers! For faster choosing!
Code:
Jump to Hero
    Events
        Player - Player 1 (Red) types a chat message containing <Empty String> as A substring
        Player - Player 2 (Blue) types a chat message containing <Empty String> as A substring
        Player - Player 3 (Teal) types a chat message containing <Empty String> as A substring
        Player - Player 4 (Purple) types a chat message containing <Empty String> as A substring
        Player - Player 5 (Yellow) types a chat message containing <Empty String> as A substring
        Player - Player 6 (Orange) types a chat message containing <Empty String> as A substring
        Player - Player 7 (Green) types a chat message containing <Empty String> as A substring
        Player - Player 8 (Pink) types a chat message containing <Empty String> as A substring
        Player - Player 9 (Gray) types a chat message containing <Empty String> as A substring
        Player - Player 10 (Light Blue) types a chat message containing <Empty String> as A substring
        Player - Player 11 (Dark Green) types a chat message containing <Empty String> as A substring
        Player - Player 12 (Brown) types a chat message containing <Empty String> as A substring
    Conditions
        (Integer((Entered chat string))) Less than or equal to 20
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Integer((Entered chat string))) Equal to 0
            Then - Actions
                Do nothing
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Boolean[(Player number of (Triggering player))] Equal to True
                    Then - Actions
                        Do nothing
                    Else - Actions
                        Cinematic - Clear the screen of text messages for (Player group((Triggering player)))
                        Set Integer[(Player number of (Triggering player))] = (Integer((Entered chat string)))
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                Integer[(Player number of (Triggering player))] Less than or equal to 20
                            Then - Actions
                                Unit - Replace Unit[(Player number of (Triggering player))] with a Heros[Integer[(Player number of (Triggering player))]] using The new unit's default life and mana
                                Set Unit[(Player number of (Triggering player))] = (Last replaced unit)
                                Selection - Select Unit[(Player number of (Triggering player))] for (Triggering player)
                                Game - Display to (Player group((Triggering player))) the text: (Name of Unit[(Player number of (Triggering player))])
                            Else - Actions
                        Unit - Pause Unit[(Player number of (Triggering player))]
This is to choose the selected hero.
SELECT THE HERO
Code:
Select1 Copy
    Events
        Player - Player 1 (Red) Presses the Up Arrow key
        Player - Player 2 (Blue) Presses the Up Arrow key
        Player - Player 3 (Teal) Presses the Up Arrow key
        Player - Player 4 (Purple) Presses the Up Arrow key
        Player - Player 5 (Yellow) Presses the Up Arrow key
        Player - Player 6 (Orange) Presses the Up Arrow key
        Player - Player 7 (Green) Presses the Up Arrow key
        Player - Player 8 (Pink) Presses the Up Arrow key
        Player - Player 9 (Gray) Presses the Up Arrow key
        Player - Player 10 (Light Blue) Presses the Up Arrow key
        Player - Player 11 (Dark Green) Presses the Up Arrow key
        Player - Player 12 (Brown) Presses the Up Arrow key
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                [COLOR="blue"]Boolean[/COLOR][(Player number of (Triggering player))] Equal to True
            Then - Actions
                Do nothing
            Else - Actions
                Set [COLOR="blue"]Boolean[/COLOR][(Player number of (Triggering player))] = True
                Unit - Unpause [COLOR="blue"]Unit[/COLOR][(Player number of (Triggering player))]
                Camera - Reset camera for (Triggering player) to standard game-view over 2.00 seconds

Makes it so when you select another unit it wont let you.
Code:
Reselect
    Events
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Boolean[(Player number of (Owner of (Triggering unit)))] Equal to True
            Then - Actions
                Do nothing
            Else - Actions
                Selection - Select Unit[(Player number of (Triggering player))] for (Triggering player)

Makes it so you cant move around
Code:
DontMove
    Events
        Unit - A unit Is issued an order with no target
        Unit - A unit Is issued an order targeting a point
        Unit - A unit Is issued an order targeting an object
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Boolean[(Player number of (Triggering player))] Equal to True
            Then - Actions
                Do nothing
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Triggering unit) is A Hero) Equal to True
                    Then - Actions
                        Set OrderUnit[(Player number of (Triggering player))] = (Triggering unit)
                        Trigger - Turn off (This trigger)
                        Unit - Pause OrderUnit[(Player number of (Triggering player))]
                        Unit - Order OrderUnit[(Player number of (Triggering player))] to Stop
                        Unit - Unpause OrderUnit[(Player number of (Triggering player))]
                        Trigger - Turn on (This trigger)
                    Else - Actions
Ok that’s it! Your hero selection system is complete!

Why use this?
Pros-
1. Faster way of choosing a hero
2. No race to pick a hero
3. Gives you a closer look at a hero (literally) To see spells and attributes faster
4. Saves room in your map to place something that you might need there.
Cons
1. Slight lag in beginning but goes away

Well that’s it! Thank you for looking at this system and I Hope you use it! Please give credit if you use it!
Thanks Happy map making!:thup:

Changes in 1.1
-Extreme less lag
-Camera stays in place
-Leaks removed
 

Attachments

  • XxShadyxX Keyboard Hero Selection! v1.1.w3x
    23.6 KB · Views: 269

Trollvottel

never aging title
Reaction score
262
Demo Map available? :eek: systems are so nice because you dont have to do everything by your own....
 

XxShadyxX

I abused the rep system.
Reaction score
81
Ok there is a demo map now! Gl hf! Please ppl test it out and comment!!
 

quraji

zap
Reaction score
144
Neat system :)

I found it annoying though that the camera kept trying to move while I was selecting heroes :p

+rep and props for a cool system and effort.
 

Romek

Super Moderator
Reaction score
964
Dude.. Wtf is all this spam?!
You posted 6 times in a row!

Isn't this the same as your other 'system'?

Leaks: none
As you can probally see there are a few leaks but I bet you all know how to fix them.
Gj contradicting yourself. Also, a system should minimize work for the user.
 

XxShadyxX

I abused the rep system.
Reaction score
81
oops sorry i havent edited the codes becuase the 1.1 of the system is leakless!
dude yea I posted 6 times in a row but each one is 24 hours apart...
sorry I forgot to edit it....

and as to the other system I redid it to be less laggier and better and rewrote it to have better description
 

Romek

Super Moderator
Reaction score
964
They're not 24 hours apart.
In order, they're: 22 minutes, >24 hours, 12 hours, 10 hours, ~24 hours.

Anyway, you could've updated the old system, right? :)
 

XxShadyxX

I abused the rep system.
Reaction score
81
not really.... too hard becuase I would have to rewrite everything and ugh.... find out which is suppose to stay or not... so sorry
anyway thx for the +rep :D
 

Romek

Super Moderator
Reaction score
964
I gave you +Rep? I don't remember :p
Oh well ^^
 

XxShadyxX

I abused the rep system.
Reaction score
81
lol thx...
anyway people I would love more comments on this.. I will update the codes soon but it is already on the 1.1 version of the map so dl that and copy and paste...
 

hio77

New Member
Reaction score
1
not sure lol maybe fix the bouncing it dose at times when changing heros (screen trys to move and bounces back)

lol but realy its a realy good slection im gessing its baseded off the race map(forgot its name lol)


EDIT: i came up with an idea lol is it posible for you to add a random function to it :D and maybe allow it so the host choses all random or all pick at the start basicly allowing it to be used more for hero arenas :D ^^ im just starting my first hero arena and might end up using this for the slection becuse i hate the normal circle slection lol
 

XxShadyxX

I abused the rep system.
Reaction score
81
Nope not based on anything... Just thought of it one day and made it...
I already fixed the bouncing.. check out v1.1
 

hio77

New Member
Reaction score
1
i was using 1.1 lol :D
just thought u must have learnt the idea from that map lol
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top