• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[vJASS] How to change melee to ranged

Status
Not open for further replies.
Level 6
Joined
Dec 6, 2009
Messages
173
Hello! I would like to know how I can combine this system: https://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:
 
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.
Back
Top