- Joined
- May 11, 2010
- Messages
- 278
Hey everyone! Long time no see. I'm back to making maps and I've already run into a problem. That's what I get for taking an 8 month break I guess 
I want to make an ability that targets the unit that is closest to the caster, but it should only target units that the caster is facing. So if the caster has one unit 50 distance behind him and another unit 200 distance in front of him, it should target the one in front of him.
Now, I know how to pick the closest unit, but how do i check if the caster is facing that unit? I'm kind of at a loss here. Also, it should be limited to something along the lines of sight range, but that shouldn't be too hard.
I'd prefer a GUI solution.
I want to make an ability that targets the unit that is closest to the caster, but it should only target units that the caster is facing. So if the caster has one unit 50 distance behind him and another unit 200 distance in front of him, it should target the one in front of him.
Now, I know how to pick the closest unit, but how do i check if the caster is facing that unit? I'm kind of at a loss here. Also, it should be limited to something along the lines of sight range, but that shouldn't be too hard.
I'd prefer a GUI solution.