• 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.

Items

Status
Not open for further replies.
...Translation:
  • Trigger
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Set ItemTypes[1] = Boots of Speed
    • Set ItemTypes[2] = Boots of Agility
    • Set ItemTypes[3] = X
    • Set ItemTypes[4] = Y
    • ....
    • Set ItemPrices[1] = 200
    • Set ItemPrices[2] = 300
    • Set ItemPrices[3] = X
    • Set ItemPrices[4] = Y
    • ...
  • Trigger1
  • Events
    • Unit - A unit sells an item (from shop)
  • Conditions
  • Actions
    • If (All Conditions are true) then do (Actions), else do (Actions)
      • If (Conditions)
        • (Unit-type of (Buying unit)) Equal to Damage God
      • Then
        • For each (Integer A) from 1 to 4, do (Actions)
          • Loop - Actions
            • If (All Conditions are true) then do (Actions), else do (Actions)
              • If - Conditions
                • (Item-type of (Sold Item)) Equal to ItemTypes[(IntegerA)]
              • Then - Actions
                • Hero - Drop (Sold Item) from (Buying unit)
                • Item - Remove (Last dropped item)
                • Game - Display to (Player Group(Owner of (Buying unit))) the text: "You cannot buy speed items, when in god mode."
                • Player - Add ItemPrices[(IntegerA)] to (Owner of (Buying unit))
              • Else - Actions
          • Else - Actions
ItemTypes is an Item-type variable, while ItemPrices is an Integer Variable.
Up to how many items you have that boost your speed, change the "For each (Integer A) from to 1 to Y". Y = the maximum number of array in "ItemTypes[]".
 
Status
Not open for further replies.
Top