• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Item permanent bonus

Status
Not open for further replies.
Level 3
Joined
Feb 21, 2012
Messages
38
Guys can u give me a code that is how to make a trigger for-
-A unit buys and item the item is destroyed as soon as it comes in inventory
IF- the item is equal to My Item
Action - Increase damage of all footmen horsemen and militia by 3

PLEASE Give me in format-
"Event-
Unit-Genric unit Event
A unit -________
Condition-"
As i am extremely new to world editor
thanks ina dvance
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
  • Untitled Trigger 001
    • Events
      • Unit - A unit Sells an item (from shop)
    • Conditions
      • (Item-type of (Sold Item)) Equal to Claws of Attack +15
    • Actions
      • Item - Remove (Sold Item)
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Unit-type of (Picked unit)) Equal to Footman
                  • (Unit-type of (Picked unit)) Equal to Militia
            • Then - Actions
              • Unit - Add Item Damage Bonus (+3) to (Picked unit)
            • Else - Actions
this applied the current militia and footmans, but no if u create another later, the best way if u want make to all unit is:

make upgrade what add +3 damagem, add it to footman/militia in object editor and when unit buy that item then increase player -techtree level-your upgrade to level 1
like
  • Player - Set the current research level of Iron Forged Swords to 1 for (Owner of (Buying unit))
 
Level 3
Joined
Feb 21, 2012
Messages
38
Thanks man for ur post but with this thres one problem

it increases the damage once and after that it dont............................................any suggestion?
isnt thre a trigger like -Give all units of type +3 damage

so my real purupose is that -
Anybody buys a particular item-
Item is qual to My Item-
Give all units +3 damage when ever the item is brought
 
Level 3
Joined
Feb 21, 2012
Messages
38
Shadow u didnt got my point see in ur map wen u buy tht item it gives +3 damage to all units but when u buy that item again it remains +3 and not +6
 
Status
Not open for further replies.
Top