- Joined
- Sep 20, 2015
- Messages
- 385
Hello, im trying to make a spell that make the caster dash in a direction, if the caster collide with a unit in front of him during the dash, the caster stops and kick the unit back damaging it, otherwise just move to that point.
I've already made a dash ability, based on channel, with 2 triggers, 1 for casting, 1 loop for moving the unit. It works fine.
The problem is detecting when the caster collide with a unit that is in front of him.
For the collision i use the event : 'unit comes within 100 of caster' but it is circular, so if the caster dashes and pass near a unit it stops anyway.
I tried messing up with conditions and angles but didn't manage to make it work. I have also searched for some similar treads but most of them are related to an ability cast event not to a collision detecting event. Also i saw a lot of possibilites and need to choose the best one.
P.S. another question, i keep getting script error after i added a custom script to a gui trigger, i'll post the complete trigger later.
Thanks in advance
I've already made a dash ability, based on channel, with 2 triggers, 1 for casting, 1 loop for moving the unit. It works fine.
The problem is detecting when the caster collide with a unit that is in front of him.
For the collision i use the event : 'unit comes within 100 of caster' but it is circular, so if the caster dashes and pass near a unit it stops anyway.
I tried messing up with conditions and angles but didn't manage to make it work. I have also searched for some similar treads but most of them are related to an ability cast event not to a collision detecting event. Also i saw a lot of possibilites and need to choose the best one.
P.S. another question, i keep getting script error after i added a custom script to a gui trigger, i'll post the complete trigger later.
Thanks in advance