[Solved] Requirements

Status
Not open for further replies.
Level 11
Joined
Jun 20, 2017
Messages
380
How can I make a requirement to the merchant that only first group can buy item/unit from it? so when the second group tries to buy an item they want that requirement.
and what about time and reach level
For example, some items require X minutes or some units need X level of hero, then u can buy
I tried something like this, but it works only for hero
  • Vampires Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Pick every player in (All allies of Player 11 (Dark Green)) and do (Actions)
        • Loop - Actions
          • Player - Set the current research level of Only vampires can buy to 1 for (Picked player)
1.jpg
2.jpg
3.jpg


does this work fine for time?!
  • Requires 12 minutes
    • Events
      • Time - Elapsed game time is 720.00 seconds
    • Conditions
    • Actions
      • Player Group - Pick every player in (All allies of Player 11 (Dark Green)) and do (Actions)
        • Loop - Actions
          • Player - Set the current research level of Available after 12 minutes to 1 for (Picked player)
and this one is not working!
  • Requires Level 30
    • Events
      • Unit - A unit Gains a level
    • Conditions
      • (Hero level of (Leveling Hero)) Greater than or equal to (>=) 30
    • Actions
      • Player Group - Pick every player in (All allies of Player 11 (Dark Green)) and do (Actions)
        • Loop - Actions
          • Player - Set the current research level of Reach Level 30 to 1 for (Picked player)
a.jpg
 
Last edited:
Level 11
Joined
Jun 20, 2017
Messages
380
ty:thumbs_up:, I also found this metod but the problem is you're going to ruin the cooldown of units, the solution is good for lowest cooldown.
  • Cant Buy Unit
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • ((Owner of (Buying unit)) is in PlayerGroup_Humans) Equal to (==) True
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Sold unit)) Equal to (==) Infernal
        • Then - Actions
          • Unit - Remove (Sold unit) from the game
          • Custom script: call DisplayTimedTextToPlayer(GetOwningPlayer(GetBuyingUnit()), 0.50, -1.00, 2.00, "|cffffcc00" + "Only vampires can buy." + "|r")
        • Else - Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Sold unit)) Equal to (==) Mountain Giant [Dummy]
        • Then - Actions
          • Set Point_Unit = (Position of (Sold unit))
          • Unit - Remove (Sold unit) from the game
          • Unit - Create 1 Mountain Giant for (Owner of (Buying unit)) at Point_Unit facing Default building facing (270.0) degrees
          • Custom script: call RemoveLocation(udg_Point_Unit)
        • Else - Actions
what about item?! should I make 2 item 1 fake 1 real?!
And is there anyway that can I make a Neutral Passive shop so the shop only works for vampires? but the human groups able to see what's inside the shop but they are disabled(Because my map uses a lot of units and items).
 
Level 9
Joined
Jul 30, 2018
Messages
445
Item shop buildings need two abilities: Shop Sharing or Select Hero (and Shop Purchase Item). Shop Sharing will allow only friendly units to buy from the shop and Select Hero allows everyone to buy from the shop. Items made always start at full stock, but can have requirements. Items sold don't care about requirements, but start at 0 stock.
 
Status
Not open for further replies.
Top