• Check out the results of the Techtree Contest #19!
  • 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 void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

line damage that hits first target

Status
Not open for further replies.
Level 3
Joined
Oct 5, 2010
Messages
26
Im making a shooting simulation where the player uses a dummy skill to "shoot" and the game hits the first thing in the line of fire. Spells like shockwave hits in a line but passes through everything. Is there a default spell that hits the first thing in the line?
 
ok, that will work for my rocket launcher with AOE on death. But what about bullets that hit instantly and without AOE?
 
Well, it isn't that hard. you could make a dummy unit, let's say, Bullet. When it is fired you star a loop. You move the bullet 5-10 units per loop, and check for collision. This loop happens at once. So there is no "every x seconds game time" nor any "wait x seconds". You simply move the bullet in 0 seconds so it looks like it is instant. And make a small aoe(20-50), cause else it will hardly ever hit a target.
 
Status
Not open for further replies.
Back
Top