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