• 🏆 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!

[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