I'm trying to make a trigger that will allow me to have a melee attack for a dark templar, So I need to meet the following conditions:
if Mouse 1 is clicked && number of enemies within short distance > 0:
Attack unit within short distance once
or attack all units within short distance
else if Mouse 1 is clicked:
Play attack animation
I'd also like to have it so that you can't button bash the attack button so the dark templar isn't swinging his sword/scythe all around the shop, AKA you can click it as many times as you want but the animation will only recycle when the animation has stopped.
Any help would be appreciated. I'm a long time coder but the syntax for the galaxy editor is really forign to me.
Have a region(In this case named RegionMeleeRange), shaped as a cone, attached to the unit(In this case varDT) with a slight offset so it is infront of the unit. Also have a variable(In this case varTriggerRunning), to make sure the trigger isn't ran multiple times.
OK, I've put it all together but it doesn't seem to work. To prevent my DT from running off like a nutter killing everything within range i've had to set the default aquire to none. Would this be disabling the trigger?
Edit:-
Managed to get it working now but the animation is still doing that weird spam thing.
Hi
I'm trying to make a trigger that will allow me to have a melee attack for a dark templar, So I need to meet the following conditions:
if Mouse 1 is clicked && number of enemies within short distance > 0:
else if Mouse 1 is clicked:
I'd also like to have it so that you can't button bash the attack button so the dark templar isn't swinging his sword/scythe all around the shop, AKA you can click it as many times as you want but the animation will only recycle when the animation has stopped.
Any help would be appreciated. I'm a long time coder but the syntax for the galaxy editor is really forign to me.
Perhaps something like this.
Have a region(In this case named RegionMeleeRange), shaped as a cone, attached to the unit(In this case varDT) with a slight offset so it is infront of the unit. Also have a variable(In this case varTriggerRunning), to make sure the trigger isn't ran multiple times.
@7MM3: Go
OK, I've put it all together but it doesn't seem to work. To prevent my DT from running off like a nutter killing everything within range i've had to set the default aquire to none. Would this be disabling the trigger?
Edit:- Managed to get it working now but the animation is still doing that weird spam thing.