• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Hero Selection Trigger

Status
Not open for further replies.
Level 4
Joined
Jan 27, 2020
Messages
51
  • Pick Heroes Copy
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 2 (Blue) Selects a unit
      • Player - Player 3 (Teal) Selects a unit
      • Player - Player 4 (Purple) Selects a unit
      • Player - Player 5 (Yellow) Selects a unit
      • Player - Player 6 (Orange) Selects a unit
    • Conditions
      • Has_Picked[(Player number of (Triggering player))] Equal to False
      • Or - Any (Conditions) are true
        • Conditions
          • (Owner of (Triggering unit)) Equal to Neutral Passive
          • (Owner of (Triggering unit)) Equal to Neutral Passive
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to (Unit-type of Select_Hero[(Player number of (Triggering player))])
          • ((Triggering unit) is A Hero) Equal to True
        • Then - Actions
          • Set SpeciaFX = (Last created special effect)
          • Set Has_Picked[(Player number of (Triggering player))] = True
          • Set TempPoint = (Center of hero spawn team 1 2 3 <gen>)
          • Unit - Create 1 (Unit-type of (Triggering unit)) for (Triggering player) at TempPoint facing Default building facing degrees
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Unit-type of (Triggering unit)) Equal to Kil'jaeden
                  • (Unit-type of (Triggering unit)) Equal to Arthas
            • Then - Actions
              • Unit - Set mana of (Last created unit) to 0.00%
            • Else - Actions
          • Set Player_Unit_Heroes[(Player number of (Triggering player))] = (Last created unit)
          • Cinematic - Clear the screen of text messages for (Player group((Triggering player)))
          • Camera - Reset camera for (Triggering player) to standard game-view over 0.00 seconds
          • Camera - Pan camera for (Triggering player) to TempPoint over 0.00 seconds
          • Custom script: call RemoveLocation( udg_TempPoint )
          • Selection - Select (Last created unit) for (Triggering player)
        • Else - Actions
          • Animation - Play (Triggering unit)'s attack animation
          • Animation - Queue (Triggering unit)'s stand animation
          • Cinematic - Clear the screen of text messages for (Player group((Triggering player)))
          • Set Select_Hero[(Player number of (Triggering player))] = (Triggering unit)
          • Set TempInt = (Point-value of (Triggering unit))
          • Set TempPlayer = (Triggering player)
hello guys im making a hero selection that double clicked to select a unit but i have a problem how to make forceA and forceB spawn in a certain region, the game is 3v3
 
Level 39
Joined
Feb 27, 2007
Messages
5,023
(Player group((Triggering player))) leaks a dynamically created force (player group). You can read how to fix this here: Things That Leak

On map init, put the players in 2 different player groups and create 2 different spawn point locations (save in a variable). Then you can check if the triggering player here is in one of those player groups; if so, do things at SpawnPointA; if not, do things at SpawnPointB.
 
Status
Not open for further replies.
Top