Hero Selection System - Need help!

Dalemil

New Member
Reaction score
2
This trigger is not working. I went ingame and double clicked on the hero that's inside the trigger but nothing happened.

Trigger:
  • Events
    • Time - Elapsed game time is 1.00 seconds
    • Actions
      • Set PlayingPlayers = (All players matching ((((Matching player) slot status) Equal to Is playing) and (((Matching player) controller) Equal to User)))
      • Set HasChosenheroGroup = (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing)))
      • Player Group - Pick every player in PlayingPlayers and do (Actions)
        • Loop - Actions
          • Trigger - Add to Choosing Hero <gen> the event (Player - (Picked player) Selects a unit)


Trigger:
  • Conditions
    • ((Triggering unit) is A Hero) Equal to True
    • (Owner of (Triggering unit)) Equal to Neutral Passive
    • HasHero[(Player number of (Triggering player))] Equal to False
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Triggering unit) Not equal to SelectedHero[(Player number of (Triggering player))]
        • Then - Actions
          • Set HeroSelectCounter[(Player number of (Triggering player))] = 0
          • Set SelectedHero[(Player number of (Triggering player))] = (Triggering unit)
        • Else - Actions
      • Set HeroSelectCounter[(Player number of (Triggering player))] = HeroSelectCounter[((Player number of (Triggering player)) + 1)]
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HeroSelectCounter[(Player number of (Triggering player))] Equal to 1
        • Then - Actions
          • -------- INSERT HEROES HERE --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Triggering unit)) Equal to Ravager (Odin)
            • Then - Actions
              • Custom script: call DisplayTextToPlayer(GetTriggerPlayer(), 0, 0, "|cff995500Jesus.|r")
            • Else - Actions
              • Do nothing
          • -------- INSERT HEROES HERE --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • HasClickedOnHero[(Player number of (Triggering player))] Equal to False
            • Then - Actions
              • Custom script: call DisplayTextToPlayer(GetTriggerPlayer(), 0, 0, "")
              • Custom script: call DisplayTextToPlayer(GetTriggerPlayer(), 0, 0, " -Click again on this hero to choose it. ")
              • Set HasClickedOnHero[(Player number of (Triggering player))] = True
            • Else - Actions
              • Do nothing
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Triggering unit) Equal to SelectedHero[(Player number of (Triggering player))]
          • HeroSelectCounter[(Player number of (Triggering player))] Equal to 2
        • Then - Actions
          • Unit - Change ownership of (Triggering unit) to (Triggering player) and Change color
          • Set Hero[(Player number of (Triggering player))] = (Triggering unit)
          • Custom script: call DisplayTextToPlayer(GetTriggerPlayer(), 0, 0, "You have chosen the " + GetUnitName(GetTriggerUnit()) + "!")
          • Set HasHero[(Player number of (Triggering player))] = True
          • Player Group - Remove (Triggering player) from HasChosenheroGroup
        • Else - Actions
      • Wait 15.00 seconds
      • Set HasClickedOnHero[(Player number of (Triggering player))] = False
 

jig7c

Stop reading me...-statement
Reaction score
123
in your conditions
try changing this:
Code:
(Triggering unit) is A Hero) Equal to True
(Owner of (Triggering unit)) Equal to Neutral Passive
HasHero[(Player number of (Triggering player))] Equal to False
to:
Code:
(Picked unit) is A Hero) Equal to True
(Owner of (Picked unit)) Equal to Neutral Passive
HasHero[(Player number of (Picked player))] Equal to False
 

Dalemil

New Member
Reaction score
2
I tried that, didn't work. Unless you mean to change every Triggering Unit/Player to Picked Unit/Player?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top