• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Hero Selection System question

Status
Not open for further replies.
Level 8
Joined
Feb 17, 2007
Messages
368
The heroes I have for selection are all neutral passive, and so when players cycle between the heroes they can't see what abilities the heroes have. I want the heroes to be selectable by the players so they can see the abilities the heroes have, but not be able to move them or use the abilities. How can I do this?
 
Level 8
Joined
Feb 17, 2007
Messages
368
It's a modified version of the one posted by real138. Here it is:


Left Arrow Trigger:

  • 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
  • Conditions
    • Hero_Selected[(Player number of (Triggering player))] Equal to False
    • Picking_Hero[(Player number of (Triggering player))] Equal to True
  • Actions
    • Set Hero_Selector[(Player number of (Triggering player))] = (Hero_Selector[(Player number of (Triggering player))] - 1)
    • For each (Integer B) from 1 to 25, do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Hero_Selector[(Player number of (Triggering player))] Equal to (Integer B)
          • Then - Actions
            • Set HeroSelectInfo = (Player group((Triggering player)))
            • Selection - Select Hero_For_Selection[(Integer B)] for (Triggering player)
            • Camera - Lock camera target for (Triggering player) to Hero_For_Selection[(Integer B)], offset by (0.00, 0.00) using Default rotation
            • Set Current_Hero[(Player number of (Triggering player))] = (Unit-type of Hero_For_Selection[(Integer B)])
            • Cinematic - Clear the screen of text messages for (Player group((Triggering player)))
            • Game - Display to HeroSelectInfo for 30.00 seconds the text: HS_Text_Name[(Integer B)]
            • Game - Display to HeroSelectInfo for 30.00 seconds the text: HS_Text_Type[(Integer B)]
            • Game - Display to HeroSelectInfo for 30.00 seconds the text: HS_Text_Description[(Integer B)]
            • Game - Display to HeroSelectInfo for 30.00 seconds the text: |cff4169e1To pick a...
            • Custom script: call DestroyForce(udg_HeroSelectInfo)
          • Else - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Hero_Selector[(Player number of (Triggering player))] Equal to 0
              • Then - Actions
                • Set HeroSelectInfo = (Player group((Triggering player)))
                • Camera - Lock camera target for (Triggering player) to Hero_For_Selection[26], offset by (0.00, 0.00) using Default rotation
                • Selection - Select Toad 0094 <gen> for (Triggering player)
                • Set Hero_Selector[(Player number of (Triggering player))] = 26
                • Set Current_Hero[(Player number of (Triggering player))] = Toad
                • Cinematic - Clear the screen of text messages for (Player group((Triggering player)))
                • Game - Display to HeroSelectInfo for 30.00 seconds the text: HS_Text_Name[26]
                • Game - Display to HeroSelectInfo for 30.00 seconds the text: HS_Text_Type[26]
                • Game - Display to HeroSelectInfo for 30.00 seconds the text: HS_Text_Description[26]
                • Game - Display to HeroSelectInfo for 30.00 seconds the text: |cff4169e1To pick a...
                • Custom script: call DestroyForce(udg_HeroSelectInfo)
              • Else - Actions
Right Arrow Trigger:

  • 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
  • Conditions
    • Picking_Hero[(Player number of (Triggering player))] Equal to True
    • Hero_Selected[(Player number of (Triggering player))] Equal to False
  • Actions
    • Set Hero_Selector[(Player number of (Triggering player))] = (Hero_Selector[(Player number of (Triggering player))] + 1)
    • For each (Integer B) from 1 to 26, do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Hero_Selector[(Player number of (Triggering player))] Equal to (Integer B)
          • Then - Actions
            • Set HeroSelectInfo = (Player group((Triggering player)))
            • Camera - Lock camera target for (Triggering player) to Hero_For_Selection[(Integer B)], offset by (0.00, 0.00) using Default rotation
            • Selection - Select Hero_For_Selection[(Integer B)] for (Triggering player)
            • Set Current_Hero[(Player number of (Triggering player))] = (Unit-type of Hero_For_Selection[(Integer B)])
            • Cinematic - Clear the screen of text messages for (Player group((Triggering player)))
            • Game - Display to HeroSelectInfo for 30.00 seconds the text: HS_Text_Name[(Integer B)]
            • Game - Display to HeroSelectInfo for 30.00 seconds the text: HS_Text_Type[(Integer B)]
            • Game - Display to HeroSelectInfo for 30.00 seconds the text: HS_Text_Description[(Integer B)]
            • Game - Display to HeroSelectInfo for 30.00 seconds the text: |cff4169e1To pick a...
            • Custom script: call DestroyForce(udg_HeroSelectInfo)
          • Else - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Hero_Selector[(Player number of (Triggering player))] Equal to 27
              • Then - Actions
                • Set HeroSelectInfo = (Player group((Triggering player)))
                • Camera - Lock camera target for (Triggering player) to Hero_For_Selection[1], offset by (0.00, 0.00) using Default rotation
                • Selection - Select Goku 0012 <gen> for (Triggering player)
                • Set Hero_Selector[(Player number of (Triggering player))] = 1
                • Set Current_Hero[(Player number of (Triggering player))] = Goku
                • Cinematic - Clear the screen of text messages for (Player group((Triggering player)))
                • Game - Display to HeroSelectInfo for 30.00 seconds the text: HS_Text_Name[1]
                • Game - Display to HeroSelectInfo for 30.00 seconds the text: HS_Text_Type[1]
                • Game - Display to HeroSelectInfo for 30.00 seconds the text: HS_Text_Description[1]
                • Game - Display to HeroSelectInfo for 30.00 seconds the text: |cff4169e1To pick a...
                • Custom script: call DestroyForce(udg_HeroSelectInfo)
              • Else - Actions
Hero Select Trigger:

  • Events
    • Player - Player 1 (Red) skips a cinematic sequence
    • Player - Player 2 (Blue) skips a cinematic sequence
    • Player - Player 3 (Teal) skips a cinematic sequence
    • Player - Player 4 (Purple) skips a cinematic sequence
    • Player - Player 5 (Yellow) skips a cinematic sequence
    • Player - Player 6 (Orange) skips a cinematic sequence
    • Player - Player 7 (Green) skips a cinematic sequence
    • Player - Player 8 (Pink) skips a cinematic sequence
  • Conditions
    • Hero_Selected[(Player number of (Triggering player))] Equal to False
    • Picking_Hero[(Player number of (Triggering player))] Equal to True
  • Actions
    • Set InitStartSpot = (Center of Region 105 <gen>)
    • Cinematic - Clear the screen of text messages for (All players matching (Picking_Hero[(Player number of (Triggering player))] Equal to True))
    • Set Picking_Hero[(Player number of (Triggering player))] = False
    • Set Hero_Selected[(Player number of (Triggering player))] = True
    • Visibility - Create an initially Enabled visibility modifier for (Triggering player) emitting Visibility across Region 100 <gen>
    • Set VisibleArray[(Player number of (Triggering player))] = (Last created visibility modifier)
    • Unit - Create 1 Current_Hero[(Player number of (Triggering player))] for (Triggering player) at InitStartSpot facing Default building facing degrees
    • Custom script: call RemoveLocation (udg_InitStartSpot)
    • Game - Display to (All players) for 5.00 seconds the text: (CounterColor[(Player number of (Triggering player))] + ((Name of (Triggering player)) + (|cff4169e1 has selected a|r + (Proper name of (Last created unit)))))
    • Player - Set name of (Triggering player) to (player_name_raw[(Player number of (Triggering player))] + (( ( + (Proper name of (Last created unit))) + (CounterColor[(Player number of (Triggering player))] + ))))
    • Unit Group - Add (Last created unit) to Hero_Selected_Unit_Group
    • Set Players_Heroes[(Player number of (Triggering player))] = (Last created unit)
    • Selection - Select (Last created unit) for (Triggering player)
    • Camera - Reset camera for (Triggering player) to standard game-view over 0.00 seconds
    • Camera - Set (Triggering player)'s camera Height Offset to 400.00 over 0.00 seconds
    • Player Group - Remove (Triggering player) from Hero_Selecting_Group
    • Player Group - Remove (Triggering player) from RepickHeroSelecting
    • Player Group - Add (Triggering player) to Hero_Selected_Group
    • Set FloatTxtGroup = (Player group((Triggering player)))
    • Floating Text - Show WoWFloatTxt[1] for FloatTxtGroup
    • Floating Text - Show WoWFloatTxt[2] for FloatTxtGroup
    • Floating Text - Show WoWFloatTxt[3] for FloatTxtGroup
    • Floating Text - Show WoWFloatTxt[4] for FloatTxtGroup
    • Custom script: call DestroyForce(udg_FloatTxtGroup)
 
Level 8
Joined
Feb 17, 2007
Messages
368
Ehh no not really what I want, I just want to add the little functionality of being able to select the hero and see its abilities without moving it or using them. :p I'm playing with allowing neutral passive to share control to all players in the hero selecting group, but when trying to set a trigger to prevent the units from moving or issuing any orders, the game just exits, so I assume it somehow crashes the game. Heres the trigger for 1 of the units:

  • Unit - A unit Is issued an order targeting a point
  • Unit - A unit Is issued an order with no target
  • Conditions
    • (Triggering unit) Equal to Goku 0012 <gen>
  • Actions
    • Unit - Order (Triggering unit) to Stop
 
It's all about idea :)
Pick neutral player (brown for example)
Make it fully sharable to other players (well ones who can pick hero)!
Create duplicate all your heroes and turn them into building :)
Players can click on them check damage, attributes, even abilities, well everything.
You can add new abilities to it (Select Hero for example to pick this one or More Info that can be based on passive ability with hero history instead ability description).

Thanks Nestharus for posts above.
 
Level 8
Joined
Feb 17, 2007
Messages
368
Well if I make duplicate of all of them and turn them into buildings, when they press the escape key it'll create the type of hero currently selected... which in this case would be the building. So I'm not sure how exactly this would work lol, isn't there another way where I wouldn't have to reconfigure the whole system? :p Also how do I get rid of the message at the start that says "You have been granted control of Player X's units"? If anyone has a better way to do this I'd love to hear from you. :p
 
Level 8
Joined
Feb 17, 2007
Messages
368
I did haha, I'm not sure how to integrate the function with my system though since it's different in that it creates the hero for the player integer B, but in mine the heroes are all ready preplaced on the map, and they're owned by neutral passive.
 
Level 8
Joined
Feb 17, 2007
Messages
368
Oh wow ok, yeah I see now what you meant... :) 1 last thing, is there a way to hide the message at the beginning of the game that says "You have been granted control of Player X's units"? And also get rid of the sound that goes with it.
 
Level 13
Joined
May 11, 2008
Messages
1,198
you might be able to set the sound = null at map initialization and then after the control is shared you can set the sound back to what it normally is.
something like that.
i made custom day/night system where beginning of game is dawn but the dawn sound is paladin uther saying the light is with us instead of dawn sound of cock crowing.

if i remember right i had to find the bj sounds for those in the blizzard.j file
 
Status
Not open for further replies.
Top