Help with -allrandom

U

Uomini

Guest
Hi,

i create a map and used a comand -ar(allrandom)
the command worked when i had only 8 heroes in my tavern,
now i update for 11 heroes, changed all variables of 8 to 11...
and when i used the -AR in the game..... SPAW 2 RANDOM HEROES! WTFFFF!!! :banghead::banghead::banghead:

someone knows whats the problem?! :nuts:

bye thx
 
U

Uomini

Guest
Code:
Map Initialization
    Events
        Map initialization
    Conditions
    Actions
        Set Total_Heroes = 11
        Set Random_Count = 11
        Set Hero_Array[1] = Mountain King
        Set Hero_Array[2] = Blood Mage
        Set Hero_Array[3] = Blademaster
        Set Hero_Array[4] = Tauren Chieftain
        Set Hero_Array[5] = Death Knight
        Set Hero_Array[6] = Dreadlord
        Set Hero_Array[7] = LostValley
        Set Hero_Array[8] = Priestess of the Moon
        Set Hero_Array[9] = Archmage
        Set Hero_Array[10] = Far Seer
        Set Hero_Array[11] = Demon Hunter
        For each (Integer A) from 1 to 11, do (Actions)
            Loop - Actions
                Set Random_Data[(Integer A)] = (Integer A)

-----

Code:
Time is 15 seconds
    Events
        Time - Elapsed game time is 15.00 seconds
    Conditions
    Actions
        Trigger - Turn on Random Command <gen>
        Trigger - Turn on Repick Command <gen>
        Trigger - Turn off All Random Command <gen>
-----
Code:
Time is 45 seconds
    Events
        Time - Elapsed game time is 45.00 seconds
    Conditions
    Actions
        Trigger - Turn off Repick Command <gen>
        Trigger - Turn off Random Command <gen>
-----
Code:
All Random Command
    Events
        Player - Player 1 (Red) types a chat message containing -ar as An exact match
    Conditions
    Actions
        Trigger - Turn off Random Command <gen>
        For each (Integer A) from 1 to 11, 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 Random_Count)
                        Unit - Create 1 Hero_Array[Random_Data[Random_Hero]] for (Player((Integer A))) at ((Player((Integer A))) start location) facing Default building facing degrees
                        Selection - Select (Last created unit) for (Owner of (Last created unit))
                        Game - Display to (All players) the text: (|CFFFFF799A |CFFF9F29Cp|CFFF6EF9El|CFFF3ECA0a|CFFF0EAA2y|CFFEDE7A4e|CFFE9E4A6r |CFFE3DFAAh|CFFE0DCACa|CFFDDD9AEs |CFFD7D4B2r|CFFD3D1B4a|CFFD0CEB6n|CFFCDCBB8d|CFFCAC9BAo|CFFC7C6BCm|CFFC4C3BEe|CFFC0C0C0d |CFF00AEEF + (Name of (Last created unit)))
                        Set Random_Data[Random_Hero] = Random_Count
                        Set Random_Count = (Random_Count - 1)
                    Else - Actions
                        Do nothing

this are the trigers that i use
like i said i used 8 heroes and now i use 11, changed all variables.
dont know what happens


=/
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Read this if you don't know how to post in [noparse]
Code:
[/noparse] or [noparse][wc3][/noparse] tags.

EDIT: And you have the -ar trigger twice?
Is that a copying error or do you actually have it twice?
 
U

Uomini

Guest
oops mistake...
i have only 1 AR i pasted twice my mistake

---

changed to
Code:
 =)
 

ZiggyMcjoney

Data editor?! AAAHHHHH!
Reaction score
95
How many human players in your map?

Is it 8? If so, you changed the "8" in the Integer A loop in the -ar command trigger to 11 by mistake probably.
 

Never_Quit

New Member
Reaction score
16
Trigger:
  • Map Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Total_Heroes = 11
      • Set Random_Count = 11
      • Set Hero_Array[1] = Mountain King
      • Set Hero_Array[2] = Blood Mage
      • Set Hero_Array[3] = Blademaster
      • Set Hero_Array[4] = Tauren Chieftain
      • Set Hero_Array[5] = Death Knight
      • Set Hero_Array[6] = Dreadlord
      • Set Hero_Array[7] = LostValley
      • Set Hero_Array[8] = Priestess of the Moon
      • Set Hero_Array[9] = Archmage
      • Set Hero_Array[10] = Far Seer
      • Set Hero_Array[11] = Demon Hunter
      • For each (Integer A) from 1 to 11, do (Actions)
        • Loop - Actions
          • Set Random_Data[(Integer A)] = (Integer A)


-----

Trigger:
  • Time is 15 seconds
    • Events
      • Time - Elapsed game time is 15.00 seconds
    • Conditions
    • Actions
      • Trigger - Turn on Random Command &lt;gen&gt;
      • Trigger - Turn on Repick Command &lt;gen&gt;
      • Trigger - Turn off All Random Command &lt;gen&gt;

-----
Trigger:
  • Time is 45 seconds
    • Events
      • Time - Elapsed game time is 45.00 seconds
    • Conditions
    • Actions
      • Trigger - Turn off Repick Command &lt;gen&gt;
      • Trigger - Turn off Random Command &lt;gen&gt;

-----
Trigger:
  • All Random Command
    • Events
      • Player - Player 1 (Red) types a chat message containing -ar as An exact match
    • Conditions
    • Actions
      • Trigger - Turn off Random Command &lt;gen&gt;
      • For each (Integer A) from 1 to 11, 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 Random_Count)
              • Unit - Create 1 Hero_Array[Random_Data[Random_Hero]] for (Player((Integer A))) at ((Player((Integer A))) start location) facing Default building facing degrees
              • Selection - Select (Last created unit) for (Owner of (Last created unit))
              • Game - Display to (All players) the text: (|CFFFFF799A |CFFF9F29Cp|CFFF6EF9El|CFFF3ECA0a|CFFF0EAA2y|CFFEDE7A4e|CFFE9E4A6r |CFFE3DFAAh|CFFE0DCACa|CFFDDD9AEs |CFFD7D4B2r|CFFD3D1B4a|CFFD0CEB6n|CFFCDCBB8d|CFFCAC9BAo|CFFC7C6BCm|CFFC4C3BEe|CFFC0C0C0d |CFF00AEEF + (Name of (Last created unit)))
              • Set Random_Data[Random_Hero] = Random_Count
              • Set Random_Count = (Random_Count - 1)
            • Else - Actions
              • Do nothing


this are the trigers that i use
like i said i used 8 heroes and now i use 11, changed all variables.
dont know what happens


=/

under your all random command you have the condition under your loop set for (integer A) set it to player number of triggering player... unless you only plan on having eleven total players too.
if you add all players to the events typing -ar you can change all of you're integer a's to triggering players.

just curious. why do you change colors so many times in your game text?

also in the last trigger decreasing the rancom count will only remove the array 11 hero from the possibilities (increasing the chances of a hero of the same type) and if other players do it then the it will remove the array 10 hero, then the 9... i think that is you're problem.

a better way to handle that would be to run a check to see if someone else has the hero of type already, then re-run the trigger that makes the hero with all possible values. that way it will infinately run if all heros are taken, but will not allow any duplicates.
 
U

Uomini

Guest
didnt work player number of trigering
when i use the AR randomed two diferent heroes.

curious
blend text not solid.
 

istar

New Member
Reaction score
31
not related to your problem but i want ask
(|CFFFFF799A |CFFF9F29Cp|CFFF6EF9El|CFFF3ECA0a|CFFF0EAA2y|CFFEDE7A4e|CFFE9E4A6r |CFFE3DFAAh|CFFE0DCACa|CFFDDD9AEs |CFFD7D4B2r|CFFD3D1B4a|CFFD0CEB6n|CFFCDCBB8d|CFFCAC9BAo|CFFC7C6BCm|CFF C4C3BEe|CFFC0C0C0d |CFF00AEEF + (Name of (Last created unit)))
wtf, so many color codes? whats that for?
 

Never_Quit

New Member
Reaction score
16
didnt work player number of trigering
when i use the AR randomed two diferent heroes.

curious
blend text not solid.

Create 1 Hero_Array[Random_Data[Random_Hero]]

^^^ running that peice of code through two arrays could cause a problem
 

WolfieeifloW

WEHZ Helper
Reaction score
372
not related to your problem but i want ask
(|CFFFFF799A |CFFF9F29Cp|CFFF6EF9El|CFFF3ECA0a|CFFF0EAA2y|CFFEDE7A4e|CFFE9E4A6r |CFFE3DFAAh|CFFE0DCACa|CFFDDD9AEs |CFFD7D4B2r|CFFD3D1B4a|CFFD0CEB6n|CFFCDCBB8d|CFFCAC9BAo|CFFC7C6BCm|CFF C4C3BEe|CFFC0C0C0d |CFF00AEEF + (Name of (Last created unit)))
wtf, so many color codes? whats that for?
Making it colorful of course ;) !
"A player has randomed <UNIT>" is what it would say ingame.
 
U

Uomini

Guest
Making it colorful of course ;) !
"A player has randomed <UNIT>" is what it would say ingame.

yeah but now in the game
A player has randomed UNIT UNIT
A player has randomed UNIT ANOTHER_UNIT

=/ shit i just changed 8 for 11 and now it happens...


_______________________

FIXEDDDDDDD
i just opened an action pressed ok and test... work!!!
LOLLOLOLLZZZZZZZZZZZ!!!!!!!!!

is workinggggggggggggg!!!!!!!!!!!! yeah
thx everybody
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top