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

Swap between ranged and melee

Status
Not open for further replies.
Level 13
Joined
Oct 1, 2009
Messages
596
Does anyone know some system that might work for swapping between ranged and melee items? I want the hero to be able (through a skill) to swap his item "sword" to the item "bow" and then make a bow appear on the character instead of a sword, also increasing range and damage. When you've swapped weapons you can always swap back to melee.
 
Level 7
Joined
Nov 19, 2007
Messages
253
Well im using this in my map for auto morph:
  • Frostmourne Change
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Item-type of (Item being manipulated)) Equal to Bow
          • (Item-type of (Item being manipulated)) Equal to Sword
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • (Item-type of (Item being manipulated)) Equal to Sword
              • Or - Any (Conditions) are true
                • Conditions
                  • (Unit-type of (Triggering unit)) Equal to Your unit type
                  • (Unit-type of (Triggering unit)) Equal to Your unit type2
        • Then - Actions
          • Item - Remove (Item being manipulated)
          • Hero - Create Sword and give it to (Triggering unit)
        • Else - Actions
And heres how manual should look:
  • Swap manual
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Item-type of (Item being manipulated)) Equal to Tome of Experience
          • (Item-type of (Item being manipulated)) Equal to Tome of Experience
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Bow
        • Then - Actions
          • Item - Remove (Item being manipulated)
          • Hero - Create Sword and give it to (Triggering unit)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Sword
        • Then - Actions
          • Item - Remove (Item being manipulated)
          • Hero - Create Bow and give it to (Triggering unit)
        • Else - Actions
and then you can make give abillity or upgrade to change to melee or ranged attack
 
Status
Not open for further replies.
Top