• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

how to create a unit that attacks melee and long range?

Status
Not open for further replies.
Level 4
Joined
Jan 27, 2018
Messages
33
Please be more specific. Does it mean toggled or they just use both at will or what? There's a lot of way this can go.
I would like to create a unit like this: it attacks melee when a unit gets close, and if an enemy unit moves away it starts attacking from a distance, to simplify even more, a unit that has a melee sword and a ranged pistol
 
Level 4
Joined
May 19, 2020
Messages
316
There can be several ways. I can suggest one, although it is a little laborious, but it should work well:
You can use a "morph" style skill that doesn't have a timer between unit transformations.
As an example of the Gargoyle, as if it were to be a passive use skill (removing time for Casting, no Cooldown or spending for Mana).
You can change the "Art-Button Position X/Y" to hide the Skill visibility by shifting to a hidden slot.
In each of the two units you make the changes, one would be with distance attributes and with the Archery model and another unit would be Melee, with the model using sword.

Then creating a trigger system that activates the use of the ability alternately according to the presence of enemy units by "X" away from your unit. Activation of the transformation would be the requirement if there are enemy units nearby, activating the Melee unit. If there are no enemy units nearby, it would activate the transformation to the type Range unit.
 
Last edited:
Level 4
Joined
Jan 27, 2018
Messages
33
There can be several ways. I can suggest one, although it is a little laborious, but it should work well:
You can use a "morph" style skill that doesn't have a timer between unit transformations.
As an example of the Gargoyle, as if it were to be a passive use skill (removing time for Casting, no Cooldown or spending for Mana).
You can change the "Art-Button Position X/Y" to hide the Skill visibility by shifting to a hidden slot.
In each of the two units you make the changes, one would be with distance attributes and with the Archery model and another unit would be Melee, with the model using sword.

Then creating a trigger system that activates the use of the ability alternately according to the presence of enemy units by "X" away from your unit. Activation of the transformation would be the requirement if there are enemy units nearby, activating the Melee unit. If there are no enemy units nearby, it would activate the transformation to the type Range unit.
do you know where i can do this? I don't know anything about Warcraft Editor just some basic stuff
 
Level 4
Joined
May 19, 2020
Messages
316
do you know where i can do this? I don't know anything about Warcraft Editor just some basic stuff
Well... I could help you with that, but I'm not using my notebook with WC3 these days to build a test map, and I believe there is another simpler mechanism for this and that someone in the community can help.
For my proposal... In the Object Editor part with the units and abilities is laborious but easy, just follow these steps. For the distance and trigger detector in transforming units, you need to learn how to use triggers, only in GUI (there are some examples of triggering abilities by distance here at Hive).
 
Last edited:
Status
Not open for further replies.
Top