building a Tavern

feistaghelm

New Member
Reaction score
2
Trigger:
  • Map Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Environment - Create at (Playable map area) the weather effect Ashenvale Rain (Light)
      • Player - Set Player 1 (Red) Current gold to 5000
      • Player - Set Player 1 (Red) Current lumber to 750
      • Camera - Pan camera for Player 1 (Red) to (Position of Tavern 0000 <gen>) over 0.00 seconds
      • Player - Set Player 1 (Red) Food cap to 20
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
      • Set Random_Count = 12
      • Set Total_Heroes = 12
      • Set Hero_Array[1] = Arthas (wielding Frostmourne)
      • Set Hero_Array[2] = Lord Garithos
      • Set Hero_Array[3] = Thrall
      • Set Hero_Array[4] = Rexxar
      • Set Hero_Array[5] = Kel'Thuzad (Lich)
      • Set Hero_Array[6] = Sylvanas
      • Set Hero_Array[7] = Cenarius
      • Set Hero_Array[8] = Illidan (Evil)
      • Set Hero_Array[9] = Firelord
      • Set Hero_Array[10] = Pandaren Brewmaster
      • Set Hero_Array[11] = Naga Royal Guard
      • Set Hero_Array[12] = Lady Vashj
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
      • Set Random_Data[(Integer A)] = (Picked unit)


What do I add/delete to make this a 1 time pick? I am having fun blasting creeps with 10 heroes but I want to fix that.

Figured it out. I made a trigger to remove the tavern after I choose a hero.

Trigger:
  • tavern
    • Events
      • Unit - Tavern 0000 <gen> Sells a unit
    • Conditions
    • Actions
      • Unit - Remove Tavern 0000 <gen> from the game
      • Trigger - Turn off (This trigger)
 

vonDarkmoor

New Member
Reaction score
9
I dont know how noob you are so no insult intended, i just wanted to make it as noob-proof as possible :)

vocab: Variable = something that you can change the value of. Some examples are integers(whole numbers) real(any number) string(letters) Boolean(True/false) ect...

attachment.php


attachment.php


attachment.php



Hope that helps.

::EDIT::
umm, my bad, its CTRL+B to alter your variables, not CTRL+X :/
 

Attachments

  • 1.jpg
    1.jpg
    52.9 KB · Views: 173
  • 2.jpg
    2.jpg
    47.2 KB · Views: 171
  • 3.jpg
    3.jpg
    50.2 KB · Views: 150

Ashlebede

New Member
Reaction score
43
Trigger:
  • Set Random_Data[(Integer A)] = (Picked unit)


There is no "Picked unit" here. It should be :

Trigger:
  • Set Random_Data[(Integer A)] = Hero_Array[(Random integer from 1 to 12)]



Trigger:
  • Player Group - Pick every player in (All players) and do (Actions)
    • Loop - Actions

^
Remove this. You don't need to set the variables "For every player".
 

vonDarkmoor

New Member
Reaction score
9
It looks like the random_integer is meant to be set up so R_I[1]=Hero_Array[1] so that it can be used later on to create a random hero, but this would be redundant because you can just choose the random number option inside the array value.
 

feistaghelm

New Member
Reaction score
2
The tavern was originally for a multiplayer map. i used their code for a 1 player map and hence where the extra code came in. And it wouldn't have worked without von's help. He made that so simple for me to understand. it won't let me target the Hero_array variable in that line so my line now says:
Trigger:
  • Set Random_Data[(Integer A)] = (Random unit from (Load 1 of 12 in (Last created hashtable)))


That seems like a weird code to me but I am very new to this GUI stuff. And it still lets me choose as many heroes as I feel like from the tavern. I want it to block me after 1 choice. Aren't you glad you decided to help a noob like me? haha Just call me Nooblet! lmao
 

feistaghelm

New Member
Reaction score
2
bump

I still can't get the tavern to disable after the 1st hero is selected. Any codes to destroy the tavern after I choose a hero?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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