Hi, I am currently working on a survival map. Units are spawned by timers and should attack the player group.
I managed to send the units towards a single player-unit.
But I want them to attack maybe the nearest player or the most prioritized unit.
For instance: A focused attack may be canceled in favor of a "better" target.
I am used to triggers, but not to this extent. I read many threads related to this topic. But none of them seemed to help me sufficient.
I think it is quite a complicated topic that may be interesting for a lot of people. So, lets do this! :D
So, can anybody help me? :)
PS: Sad the WTE based on this topic was quite unpopular for some reason.
This shouldn't be to hard =3. Instead of ordering the Enemy to attack a unit group make it Attack-Move the position of the unit group(Or a random unit position in unit group). So it will attack the first unit(Which is not allied to the enemy unit) it see's. Also if you go into the data editor, and then go to the Units tab. Click on the unit u want to prioritise and search for: Combat - Attack Target Priority. If you change that to an higher number than the rest(Normally higher than 20) it will attack that one first. Hope this will help with ya map. =3
Hmm a normal Attack command should be doing the same. If you give the Attack command a position they will just move to that position and attack every enemy on the way(Just like in a mellee game when you press A and give a position). =3
You can make trigger with a Periodic Event that will order the Enemy to attack the Position of the unit every 5 seconds. Or you could adjust the Sight Radius of the Enemy unit to 32 and change the Minimum Scan Range of the weapon that the unit has to 32(This can be done in the Data Editor) if you know how to. Both of them should work. =3
- Sight Radius = how far a unit see's around him.
- Minimum Scan Range = the range the unit scans for enemy units to attack them.
Edit: Try and follow this video tutorial: . Also try to follow OnetwoSC's tutorials on youtube if you want to learn more about Triggers or Data Editing. =3
Yep, that would work, but is still a workaround in my opinion. Well it solves the problem and that's what counts.
A working A.I. still would be more of a solution. :P
No problem, and the only way I know how to work with AI or some more advanced is using Functions. But that requires some unerstanding of the Trigger Editor. =3
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi, I am currently working on a survival map. Units are spawned by timers and should attack the player group. I managed to send the units towards a single player-unit.
But I want them to attack maybe the nearest player or the most prioritized unit. For instance: A focused attack may be canceled in favor of a "better" target.
I am used to triggers, but not to this extent. I read many threads related to this topic. But none of them seemed to help me sufficient. I think it is quite a complicated topic that may be interesting for a lot of people. So, lets do this! :D
So, can anybody help me? :)
PS: Sad the WTE based on this topic was quite unpopular for some reason.
This shouldn't be to hard =3. Instead of ordering the Enemy to attack a unit group make it Attack-Move the position of the unit group(Or a random unit position in unit group). So it will attack the first unit(Which is not allied to the enemy unit) it see's. Also if you go into the data editor, and then go to the Units tab. Click on the unit u want to prioritise and search for: Combat - Attack Target Priority. If you change that to an higher number than the rest(Normally higher than 20) it will attack that one first. Hope this will help with ya map. =3
Yea, but there is no such thing as Attack-Move. There are just simple attack orders.
Edit: My fault, this move is called: Scan move. :)
Hmm a normal Attack command should be doing the same. If you give the Attack command a position they will just move to that position and attack every enemy on the way(Just like in a mellee game when you press A and give a position). =3
@patrickwobben: Go
I saw that in some videos. But wont the units past by if there is no player in their way? Like hiding in corners? ^^
You can make trigger with a Periodic Event that will order the Enemy to attack the Position of the unit every 5 seconds. Or you could adjust the Sight Radius of the Enemy unit to 32 and change the Minimum Scan Range of the weapon that the unit has to 32(This can be done in the Data Editor) if you know how to. Both of them should work. =3
- Sight Radius = how far a unit see's around him.
- Minimum Scan Range = the range the unit scans for enemy units to attack them.
Edit: Try and follow this video tutorial: . Also try to follow OnetwoSC's tutorials on youtube if you want to learn more about Triggers or Data Editing. =3
@patrickwobben: Go
Yep, that would work, but is still a workaround in my opinion. Well it solves the problem and that's what counts. A working A.I. still would be more of a solution. :P
Thanks a lot, you helped me quite well.
No problem, and the only way I know how to work with AI or some more advanced is using Functions. But that requires some unerstanding of the Trigger Editor. =3