• 🏆 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] -repick heroes, and make them available in tavern.

Status
Not open for further replies.
Level 4
Joined
Sep 12, 2006
Messages
31
I Fixed problem, not with trigger, but in object editor i changed tiers user to 0 for each hero.


I have problem with repick system from Ryoko's Hero Tavern, because if someone type -repick, i cannot get a hero, there is noone in taverns (only random work).

Here is my -repick triger:
  • Player - Player 1 (Red) types a chat message containing -repick as An exact match
  • (Number of units in (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True))) Equal to 1
  • Unit Group - Pick every unit in (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
    • Loop - Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Make (Unit-type of (Picked unit)) Available for training/construction by (Picked player)
          • Neutral Building - Add (Unit-type of (Picked unit)) to all marketplaces with 5 in stock and a max stock of 5
          • Player - Limit training of Heroes to 1 for (Picked player)
          • Player - Set (Owner of (Picked unit)) Current lumber to 100
      • Unit - Remove (Picked unit) from the game
      • Unit - Create 1 Wisp for (Triggering player) at (Center of repick <gen>) facing Default building facing degrees
      • Camera - Pan camera for (Triggering player) to (Center of repick <gen>) over 2.00 seconds
And a event when player select hero from tavern:
  • Unit - A unit Sells a unit
  • 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)
I have another -repick trigger (just for tryng), but they dont work:
  • Player - Player 1 (Red) types a chat message containing -repick as An exact match
  • Unit Group - Pick every unit in (Units in (Playable map area) owned by (Triggering player)) and do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Picked unit) is A structure) Equal to True
        • Then - Actions
          • Do nothing
        • Else - Actions
          • Player Group - Pick every player in (All players) and do (Player - Set Player 1 (Red) Current lumber to 100)
          • Unit - Remove (Picked unit) from the game
  • Unit - Create 1 Circle of Power for (Triggering player) at (Center of repick <gen>) facing Default building facing degrees
  • Player - Limit training of Heroes to 1 for Player 1 (Red)
  • Neutral Building - Add (Unit-type of (Sold unit)) to all marketplaces with 5 in stock and a max stock of 5
  • Player - Make (Unit-type of (Last created unit)) Available for training/construction by (Picked player)
And here is the event for second repick triger
  • Unit - A unit Sells a unit
  • ((Sold unit) is A Hero) Equal to True
  • Player - Limit training of Heroes to 0 for (Owner of (Buying unit))
  • Neutral Building - Remove (Unit-type of (Sold unit)) from all marketplaces
Why 2 triggers u ask ? Well i need just one to work, i dont need 2 of them to work.
 
Last edited:
Status
Not open for further replies.
Top