How do I stop auto attacking on sight?

Werdoo

New Member
Reaction score
0
Hi!

I'm trying to prevent my units from attack as soon as they see an enemy. I want them to attack only when the owner orders them to. I searched a little and found this thing called aquisition range. My trigger is:

Events
Map initialization
Conditions
Actions
Unit Group - Pick every unit in (Units owned by Player 1 (Red)) and do (Actions)
Loop - Actions
Unit - Set (Picked unit) aquisition range to 0.00

This has, however, no detectable effect on the units. They still attack if i place them near enemies.

Happy for help :)
 

Samael88

Evil always finds a way
Reaction score
181
you could change their line of sight, that should make them almost blind aswell tho, but it should serve your purpose well:)
 

HellCraft

Member
Reaction score
19
Events - Unit is issued an order targeting a unit - 'smart'
Actions - Order unit to 'stop'

Not sure if it would work, but you can try it.
 

Grags_1977

Ultra Cool Member
Reaction score
32
I tried this a long tme ago with a map I was making, I searched upo and down this forum and couldn't find any ways of doing it the way I wanted it to work.

Events - Unit is issued an order targeting a unit - 'smart'
Actions - Order unit to 'stop'
Doesn't work :(

The only other way (I know off) is change the unit to a worker, but this was even worse than auto attack for me, if the units attacked he'll flee. I just wanted the unit to stay put and do nothing until told to.
 

Werdoo

New Member
Reaction score
0
My units mustn't be blind.

What's the purpose with aquisition range if it can't be used this way?
 

wellwish3r

wishes wells.
Reaction score
52
I tried this a long tme ago with a map I was making, I searched upo and down this forum and couldn't find any ways of doing it the way I wanted it to work.

Doesn't work :(

The only other way (I know off) is change the unit to a worker, but this was even worse than auto attack for me, if the units attacked he'll flee. I just wanted the unit to stay put and do nothing until told to.

did you try making it a worker, and disabling "Can Flee"?
 

Werdoo

New Member
Reaction score
0
did you try making it a worker, and disabling "Can Flee"?

I think that disabling that would make the peasant stand up for itself instead :D

Isn't there anyone out there who've actually succeeded in doing this? Please, let your voice be heard!
 

hugahug

New Member
Reaction score
3
Set your units type to Worker
It wont attack but for evrey untit u have a workers icon appeasr in left croner...
 
Reaction score
149
If I remember correctly, adding and then removing worker classification via trigger works well too, so you don't have that nasty icon.

Haven't used WE for awhile thou, might be wrong.
 

DonRoman

New Member
Reaction score
5
Just a suggestion, but you can set the alliance type ( or is it called aspect? ) of the players to "Alliance - No Attack" (dont know the english name XD). That way the will stop auto attacking.

However you now have to press "A" to attack units, to prevent this you can create a trigger:

Events - Unit is issued an order targeting a unit
Conditions
- Unit is an Enemy
- Issued order = order smart
Actions
- Turn off this trigger
- Issue triggering unit to attack target unit of issued order
- turn on this trigger

hope it helps ;)
 

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,694
Why turn off and then turn on the trigger? It seems logically the same as without the turning on/off triggers.
 

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,694
Huh? I see...I thought events occur by player interactions.
 

T.s.e

Wish I was old and a little sentimental
Reaction score
133
If you order the unit to attack by triggers, it doesn't register the event as an order of type "smart". DonRoman is wrong, you don't have to disable and enable the trigger.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top