Hi all, im making a new map. U walk with A and S and i want it to attack with mouse but i have to problems.
- If you come closer to the unit u will attack automaticly, can you turn that off? i tried with attack target priority in the data editor but that didnt work
- the attack system must be like click, attack, click, attack, click, attack etc. Becouse if i just use this:
Second one would be to use an effect. I'm not that much into Data stuff so I can't tell exactly how it works from my memory, but basically you add a new effect to your hero's weapon effect which orders the source (your hero) to stop.
For that you probably need to turn the hero's weapon effect into a Set-effect. Then the Set-effect would contain both the normal weapon damage effect and a order effect that'd be cast on the source.
thx for this but i will still need an click attack, i tried many ways but i just cant find an condition like
If "your hero" is in range of "unit of unit type (zergling)"
than do actions: ...
lol fail trigger :D but something like that so i can use an if then else ability. oh and an action trigger where u can set someone's life to - 10 or something like that.
at your click event, for the attack order you can do the following: condition - Number of units in unit group > 0 (unit group: units in region matching conditions (region: Convert Circle to Region (Circle: 10 radius from point (point: position of unit ) ) ) )
ok this is a long condition, but it prevents the unit from attacking anything that is further then 10 radius away. (you can set 10 radius to whatever the units range is)
next you've got the attack command, which you follow with:
wait 0.2 seconds (I used 0.2 as an example it is possible that the unit will not attack with this value because his attack launches after 0.3 seconds orso.)
Issue order stop. (this is to stop the unit from firing a second shot)
You can have a trigger pick each unit within chosen distance of your unit and within certain degrees in front of the unit (use polar offset), with an action that causes a chosen Damage effect on the picked units, as well as having the unit play an attack animation to give the idea that it is an attack. Additionally, you can have the trigger turn off at the beginning of the actions, and make a wait action and re-enable the trigger at the end, so that you can not spam click and do extreme amounts of damage.
I combined every post of you and now it works, Thanks!!! I will post the map when its done :D
EDIT: only some few bugs, one is if you dont click attack he will run away.
and second, becouse i play the attack animation you will stop the walking animation for a few seconds after that so he kinda glides
Hi all, im making a new map. U walk with A and S and i want it to attack with mouse but i have to problems.
- If you come closer to the unit u will attack automaticly, can you turn that off? i tried with attack target priority in the data editor but that didnt work
- the attack system must be like click, attack, click, attack, click, attack etc. Becouse if i just use this:
You just have to click and u automaticly walk to the closest unit ánd u only have to click once and i want it so you need to click repeatedly.
Hope you understand it. If not i explain more. Thanks
EDIT : PLEASE, Anyone??? :(
For 1:
- Go to the Data Editor, Unit Tab, Select your hero. On the right side you can find a text called "Default Acquire Level". Set it to "None".
For 2:
In Warcraft we had an attack-once option.. not in SC2 however gah, I got two ideas for that. First one would be to use a trigger:
Second one would be to use an effect. I'm not that much into Data stuff so I can't tell exactly how it works from my memory, but basically you add a new effect to your hero's weapon effect which orders the source (your hero) to stop.
For that you probably need to turn the hero's weapon effect into a Set-effect. Then the Set-effect would contain both the normal weapon damage effect and a order effect that'd be cast on the source.
@s3rius: Go
thx for this but i will still need an click attack, i tried many ways but i just cant find an condition like
If "your hero" is in range of "unit of unit type (zergling)" than do actions: ...
lol fail trigger :D but something like that so i can use an if then else ability. oh and an action trigger where u can set someone's life to - 10 or something like that.
/bump
@thommiej: Go
at your click event, for the attack order you can do the following: condition - Number of units in unit group > 0 (unit group: units in region matching conditions (region: Convert Circle to Region (Circle: 10 radius from point (point: position of unit ) ) ) )
ok this is a long condition, but it prevents the unit from attacking anything that is further then 10 radius away. (you can set 10 radius to whatever the units range is)
next you've got the attack command, which you follow with:
You can have a trigger pick each unit within chosen distance of your unit and within certain degrees in front of the unit (use polar offset), with an action that causes a chosen Damage effect on the picked units, as well as having the unit play an attack animation to give the idea that it is an attack. Additionally, you can have the trigger turn off at the beginning of the actions, and make a wait action and re-enable the trigger at the end, so that you can not spam click and do extreme amounts of damage.
I combined every post of you and now it works, Thanks!!! I will post the map when its done :D
EDIT: only some few bugs, one is if you dont click attack he will run away. and second, becouse i play the attack animation you will stop the walking animation for a few seconds after that so he kinda glides
/bump