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

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?
 
Level 3
Joined
Oct 5, 2010
Messages
26
ok, that will work for my rocket launcher with AOE on death. But what about bullets that hit instantly and without AOE?
 
Level 3
Joined
Jan 4, 2009
Messages
45
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.
Top