• 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.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

My shop system isn't working, please help a brotha

Status
Not open for further replies.
Level 4
Joined
Nov 22, 2011
Messages
74
So here's my shop system that I made for my moba map. It has a main shop unit with abilities that if cast will spawn dummy shop units which are selected. So far I have 2 categories which mean two different abilites and two different dummy units as shops. But what happens is that the only one I can get to work is "Common Items". "Rare Items" has yet to spawn and I checked that it was selling the correct items. The shop is also never removed as I am trying to do in the trigger.
  • ShopNavigation
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Common Items
        • Then - Actions
          • Unit - Remove ShopCurrent[1] from the game
          • Unit - Create 1 Common Items for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
          • Selection - Select (Last created unit) for (Owner of (Casting unit))
          • Set ShopCurrent[1] = (Last created unit)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Rare Items
        • Then - Actions
          • Unit - Remove ShopCurrent[1] from the game
          • Unit - Create 1 Rare Items for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
          • Selection - Select (Last created unit) for (Owner of (Casting unit))
          • Set ShopCurrent[1] = (Last created unit)
        • Else - Actions
I can upload the map if necessary. Thanks in advance for any help. Cheers!
 
Level 24
Joined
Aug 1, 2013
Messages
4,658
Except for location leaks and redundant Get functions, I can't see any problem in this trigger.

Make sure that your shops sell the proper items and stuff.
And make sure that the shop its properly selected.


What you could do as well is use a spellbook and add abilities based of "Charge Gold and Lumber" and if such an ability is cast, you check if the unit has a free slot and give the item.
That way, you have navigation with esc and stuff and you never have problems with creating and removing units.
 
Level 4
Joined
Nov 22, 2011
Messages
74
Except for location leaks and redundant Get functions, I can't see any problem in this trigger.

Make sure that your shops sell the proper items and stuff.
And make sure that the shop its properly selected.


What you could do as well is use a spellbook and add abilities based of "Charge Gold and Lumber" and if such an ability is cast, you check if the unit has a free slot and give the item.
That way, you have navigation with esc and stuff and you never have problems with creating and removing units.
Is there any good finished shop system in gui?
 
Status
Not open for further replies.
Top