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

[Trigger] Hero Tavern

Status
Not open for further replies.
Level 2
Joined
Feb 12, 2009
Messages
13
  • Map Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Set (Picked player) Current gold to 750
          • Player - Set (Picked player) Current lumber to 100
          • Camera - Pan camera for (Picked player) to (Position of Tavern 0000 <gen>) over 0.00 seconds
          • Player - Set (Picked player) Food cap to 6
      • Set Total_Heroes = 8
      • Set Random_Count = 8
      • Set Hero_Array[1] = Alchemist
      • Set Hero_Array[2] = Naga Sea Witch
      • Set Hero_Array[3] = Tinker
      • Set Hero_Array[4] = Beastmaster
      • Set Hero_Array[5] = Dark Ranger
      • Set Hero_Array[6] = Firelord
      • Set Hero_Array[7] = Pandaren Brewmaster
      • Set Hero_Array[8] = Pit Lord
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • Set Random_Data[(Integer A)] = (Integer A)

I have followed tutorial on internet for making hero tavern and it works but it has one problem.When I pick hero he doesn't go away from tavern,he is still there(I can't pick him again because it says that I need Altar and Keep).I want that hero disappear from tavern when I pick him like in demo map that author of tutorial gave us.

I am willing to upload my little map if nobody understand where is error.Thanks in advance.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
  • Remove Unit
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • ((Sold unit) is A Hero) Equal to True
    • Actions
      • Player - Make (Unit-type of (Sold unit)) Unavailable for training/construction by (Owner of (Sold unit))
EDIT:
  • Remove Unit
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • ((Sold unit) is A Hero) Equal to True
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Make (Unit-type of (Sold unit)) Unavailable for training/construction by (Player((Integer A)))
 
Level 2
Joined
Feb 12, 2009
Messages
13
Thank you very much mate :D

Btw,1st trigger works,2nd doesn't.

:p Thanks again +rep
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
There was a slight error in the loop action:
  • Remove Unit
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • ((Sold unit) is A Hero) Equal to True
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Make (Unit-type of (Sold unit)) Unavailable for training/construction by Picked player
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
There was a slight error in the loop action:
  • Remove Unit
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • ((Sold unit) is A Hero) Equal to True
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Make (Unit-type of (Sold unit)) Unavailable for training/construction by Picked player

Player Group , Unit Group, aren't they the same ?
  • Custom script: set bj_wantDestroyGroup = true
Does we have to apply the same for this Group ? Does it leak ?
 
Status
Not open for further replies.
Top