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

Basic Manual-Aim Arrow

Status
Not open for further replies.
Level 1
Joined
Oct 27, 2011
Messages
4
Hi! I'm looking to make an ability that launches an arrow in the direction of the targeted point and effects the first unit it collides with. That is, aimed much like the classic "flesh hook" (only without the hooking part) - Just a simple flying arrow.

I understand I ought to make a dummy unit, spawn it on dummy spell cast and make it travel towards target point. It's the last part I'm insecure about; How do I make it travel closer to the target point every x seconds?

Thanks in advance
Kebur
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
You make a timer that fires every x seconds, save dummy unit and target point, determine the x/y part of the movement (dx/d, dy/d), multiply it with your speed and the move interval, the result is added to the dummy's coordinates every interval. When the remaining distance is less than the length you want to add, you place the dummy at the destination point instead and cancel the movement and all. Would be a possibility at least.
 
Level 6
Joined
Jul 25, 2010
Messages
136
Well the easiest way to do the damage multiplier upon the distance it travelled is to set the mana regen of the dummy unit to 1 every distance it travelled and set the mana to 0 at the first time it launches then use the trigger to damage the unit upon hitting the unit.

Hope that helps too :D
 
I don't see him asking for damage depending on distance travelled... but that will definitely help him in the future if ever he decides to do one...

Though using mana is not a good method, because there can be other factors which can affect his mana... the better way to do it is to just save the starting coordinates, then upon impact, calculate the distance... or you can already compute for distance travelled every time you move the missile...
 
Status
Not open for further replies.
Top