• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Swap between ranged and melee

Status
Not open for further replies.
Level 13
Joined
Oct 1, 2009
Messages
592
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