• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Is it possible to make a unit have this.. and that?

Status
Not open for further replies.
Level 5
Joined
Jun 8, 2009
Messages
101
I wan't to make a unit have a Close range melee attack, but from enemies far away give it a ranged attack. So far i've been unable to do it.

If theres anyway to do this I would appreciate the help.

I've tried having both attacks enabled. Also giving it minimum attack range but that doesn't help either.
 
Level 13
Joined
Mar 24, 2010
Messages
950
the prob doing it that way it you can only pick units for it to be able to attack by type e.g (buildings, ground units, air, ward, trees, etc stuff like that.)

you want it to be able to change back and forth in an instant? of not then you coulc use demon hunters ulti move to change back and forth between melee/ranged

I guess give a little more info, not sure why it would be beneficial to be able to be melee for some units and then ranged a sec later just becuz units are a little farther away atm.

Theres also orb affect items u can use for being able to hit air units or on ledges and whatnot for melee heros.
 
There are probably ways using triggers, but it may lag a little.

You can try make a spell based of Bear Form, and you select 2 units, 1 with melee, and 1 with ranged. Don't add Bear Form to either one though.
Now use triggers to detect when the unit should go to melee or ranged, and add that Bear Form spell to that unit, and make him cast Bear Form, but remove it from him again.
I can try make a test map for this if you want.
 
Level 5
Joined
Jun 8, 2009
Messages
101
Ghost thruster i like your idea, Lag probably wouldnt be an issue Im trying to figure out some mechanics for a Gauntlet legends game so 4 Players would be max for my game, either that or 8 player rush, 2 teams of 4 try to beat the identical game from 2 sides of the map.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Why not center a region on the unit, have two units, one melee, the other ranged, when the enemy enters region, change the ranged to the melee, when he leaves, change it back?

Use Unit Group variable rather than Region because Unit Group has better potential and easy to clean the leaks
Use Time - Periodic Event (preferably 1 second per check) to check the condition on the enemy moving in and out of a radius of a enemy detection trigger
 
Status
Not open for further replies.
Top