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

[vJASS] How to change melee to ranged

Status
Not open for further replies.
Level 6
Joined
Dec 6, 2009
Messages
168
Hello! I would like to know how I can combine this system: http://www.hiveworkshop.com/forums/spells-569/mui-advanced-equipment-system-save-load-event-133727/?prev=of%3Ddownloads_month%26order%3DDESC
With this:
  • Melee to ranged
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to (==) twohanded
    • Actions
      • Unit - Add Change Archer - Ranged to (Triggering unit)
      • Unit - Remove Change Archer - Ranged from (Triggering unit)
      • Animation - Add the Lumber animation tag to (Hero manipulating item)
      • Custom script: call UnitMakeAbilityPermanent(GetTriggerUnit(), true, 'AHfa')
  • melee to ranged 2
    • Events
      • Unit - A unit Loses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to (==)
    • Actions
      • Unit - Add Change Archer - Melee to (Hero manipulating item)
      • Unit - Remove Change Archer - Melee from (Triggering unit)
      • Animation - Remove the Lumber animation tag to (Hero manipulating item)
I want it so that when I equip a weapon lets say bow the advanced equipment system will automatically change the unit to range just like in the GUI trigger.
Thx and +rep to anyone helping! :grin:
 
Level 19
Joined
Mar 18, 2012
Messages
1,716
ye I used that system but when I added it to the equipment system the unit died when they switched from melee to ranged lol.
The unit died? That has nothing to do with those two systems. Makers system doesn't kill units.
And I recoded that inventory system from scratch for my own map, because I wasn't satisfied with eveything the Witcher did there. That system doesn't kill units either.
You may lose the complete inventory when you switch from meele to range or vice versa but certainly it doesn't kill the unit.

Afaik the range/attack system uses bearform/metamorphosis like the demon hunter in wc3. Did you add a range unit in the object editor for your hero?
 
Status
Not open for further replies.
Top