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.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top