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

Weapon - orb

Status
Not open for further replies.
Level 27
Joined
Jul 6, 2008
Messages
11,326
I need a little help... I am creating a map and... Well, there are weapons that are based on orbs, and I want to make so if melee Hero gets item, that item changes its attack range, so it would be, that Hero is not melee unit, but ranged. And if he drops item, he gets his normal attack again... And how to make that if Hero gets helmet or something like that, and he already has one, he would drop it, so he could have only 1.
 
Level 17
Joined
Jun 12, 2007
Messages
1,261
For your second question edit this trigger I made once.
It's just a small edit.

  • Only1Weapon
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-class of (Item being manipulated)) Equal to Artifact
          • Only1Weapon[(Player number of (Owner of (Triggering unit)))] Equal to False
        • Then - Actions
          • Set Only1Weapon[(Player number of (Owner of (Triggering unit)))] = True
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-class of (Item being manipulated)) Equal to Artifact
              • Only1Weapon[(Player number of (Owner of (Triggering unit)))] Equal to True
            • Then - Actions
              • Set DropPointItemWeapon[(Player number of (Owner of (Triggering unit)))] = (Position of (Triggering unit))
              • Item - Move (Item being manipulated) to DropPointItemWeapon[(Player number of (Owner of (Triggering unit)))]
              • Floating Text - Create floating text that reads (PlayerColor[(Player number of (Owner of (Triggering unit)))] + You can only wield one weapon.) at DropPointItemWeapon[(Player number of (Owner of (Triggering unit)))] with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Change the lifespan of (Last created floating text) to 5.00 seconds
              • Floating Text - Change the fading age of (Last created floating text) to 3.00 seconds
              • Floating Text - Set the velocity of (Last created floating text) to 15.00 towards (Random real number between 50.00 and 90.00) degrees
              • Custom script: call RemoveLocation(udg_DropPointItemWeapon[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
              • Set Only1Weapon[(Player number of (Owner of (Triggering unit)))] = True
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Item-class of (Item being manipulated)) Equal to Artifact
                  • Only1Weapon[(Player number of (Owner of (Triggering unit)))] Equal to False
                • Then - Actions
                  • Set Only1Weapon[(Player number of (Owner of (Triggering unit)))] = True
                • Else - Actions
  • Able2PickUpWeapon
    • Events
      • Unit - A unit Loses an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-class of (Item being manipulated)) Equal to Artifact
          • Only1Weapon[(Player number of (Owner of (Triggering unit)))] Equal to True
        • Then - Actions
          • Set Only1Weapon[(Player number of (Owner of (Triggering unit)))] = False
        • Else - Actions
Instaid of this using for weapons, change it so you just it for that item.
 
Status
Not open for further replies.
Top