• 🏆 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!

Random Hero Trigger Help

Status
Not open for further replies.
Level 5
Joined
Jul 17, 2006
Messages
145
alright, im using this trigger right here for a random hero

  • RC command
    • Events
      • Player - Player 3 (Teal) types a chat message containing -rc as An exact match
    • Conditions
      • CommandLock Equal to False
    • Actions
      • Game - Display to (All players) the text: |c0000FF00Random Ca...
      • For each (Integer A) from 3 to 12, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Player((Integer A))) slot status) Equal to Is playing
            • Then - Actions
              • Set Random_Hero = (Random integer number between 1 and Hero_Count)
              • Unit - Create 1 Hero_Array[Random_Hero] for (Player((Integer A))) at ((Player((Integer A))) start location) facing Default building facing degrees
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Owner of (Last created unit)) is an ally of Player 1 (Red)) Equal to True
                • Then - Actions
                  • Unit - Move (Last created unit) instantly to (Center of SouthRespawn <gen>)
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Owner of (Last created unit)) is an ally of Player 2 (Blue)) Equal to True
                • Then - Actions
                  • Unit - Move (Last created unit) instantly to (Center of NorthRespawn <gen>)
                • Else - Actions
              • Set Captian[(Player number of (Owner of (Last created unit)))] = (Unit-type of (Last created unit))
              • Set PlayerBoat[(Player number of (Owner of (Last created unit)))] = (Last created unit)
              • Unit - Remove (Random unit from (Units owned by (Owner of (Last created unit)) of type Hero Selecter)) from the game
              • Hero - Create Bowmen Crew and give it to (Last created unit)
              • Camera - Pan camera for (Owner of (Last created unit)) to (Position of (Last created unit)) over 1.00 seconds
            • Else - Actions
              • Do nothing
and it asigns the same hero for every 2 people (ie player 3 and 4 get captian hapo and player 5 and 6 get captian rodger, and so on), and i want it to accually be random for ever person individualy....... o_O
 
Level 5
Joined
Jul 17, 2006
Messages
145
It was on, but i dont think it would affect this, im curently testing this on bnet with my friends. However, this might help, so ill let you know via edit this post once i find out, so thanks.

Edit: It worked :) (i think)
 
Last edited:
Status
Not open for further replies.
Top