• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Solved] Remove/Add itens from marketplace

Status
Not open for further replies.
Level 14
Joined
Oct 28, 2019
Messages
536
Sometimes I think the editor trolls, everything seems ok but simply dont work

  • Initializing
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Neutral Building - Add Warrior to Tavern 0006 <gen> with 14 in stock and a max stock of 14
I´ve add Itens in marketplace owned by player 1 (maybe this is the problem). And then trying remove them if 6 archers (item) are sell.

  • IntegerArcher
    • Events
      • Unit - A unit owned by Player 1 (Red) Sells an item (from shop)
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Item-type of (Sold Item)) Equal to Bowman
          • (Item-type of (Sold Item)) Equal to Archer
      • IntegerArcher Equal to 6
    • Actions
      • Neutral Building - Remove Archer from all marketplaces
      • Neutral Building - Remove Bowman from all marketplaces
this is cause the map has 2 types of archers but a limited number need be avaliable, so if reach the integer, both must removed. IDK what is wrong.
Even add, or remove no one is working
 
Is there another trigger that increase IntegerArcher? Otherwise it's never going to be = 6. In general it's better to compare 'greater/less than (or equal)' for quantities like this in case something weird happens to the counter variable for some reason. You can do one trigger:
  • Events
    • Unit - A unit owned by Player 1 (Red) Sells an item (from shop)
  • Conditions
    • Or - Any (Conditions) are true
      • Conditions
        • Item-type of (Sold Item)) Equal to Bowman
        • Item-type of (Sold Item)) Equal to Archer
  • Actions
    • Set IntegerArcher = (IntegerArcher + 1)
    • If (All conditions are true) then (Actions) else (Actions)
      • If - Conditions
        • IntegerArcher greater than or equal to 6
      • Then - Actions
        • Neutral Building - Remove Archer from all marketplaces
        • Neutral Building - Remove Bowman from all marketplaces
        • Trigger - Turn off (This trigger)
      • Else - Actions
 
Status
Not open for further replies.
Back
Top