Idle Worker Icon, Auto attack.

Grags_1977

Ultra Cool Member
Reaction score
32
Ok, for anyone who has this problem. I created a Transparent Icon. Which i've uploaded and attached to this message should anyone else want to use it.

My work around doesn't completely get rid of the icon. As there is still an annoying [1] being shown. But it's a HELL of a lot better.


Original Message
Hey! shmee again. :thup:


Ok, so I want to turn off auto attack. But the only way I know how, is to add the classification 'worker' and set 'can flee' to false.

OMG LEARN TO SEARCH!!!

I did :(
But any solution I found just didn't work.

I've tried
Trigger:
  • Unit - Remove classification of A peon-type unit from UnitHero

The icon is removed but auto attack comes back.

I've also tried reversing it, by adding the classification but the icon comes back.
Trigger:
  • Unit - Add classification of A peon-type unit to UnitHero


I'm leaning towards the probability that it's impossible to remove the icon with my hero having the 'worker' classification. But auto attack off is an absolute must.

-----------------------

Preferably i'd like to remove the Icon. But if that fails, is there any nifty ideas out there for making it usefull.

For instance.

Adding trigger (Worker Icon is clicked). This would make the worker icon proper smart! As I'd put my map options there.
 

ZakkWylde-

New Member
Reaction score
14
Hmmm...
This is really simple, if I understand you correctly.

Go to the Object Editor, find your Hero, navigate to Combat -- Attacks Enabled (or something like that--dont have the WE in front of me) --> change this to "NONE" (it probably says Attack 1 Only, or something). That should do it... There won't be any icon either--just change the classification back to default...


---
As far setting "Can flee" to false, that has to do with the unit responding to an attack (say from an invulnerable unit) by automatically running away, without any user input--unless the Unit has been ordered to "HOLD," in which case it will just stay there. [Heck, maybe it does something else that I'm not aware of ... but anyways ... ]
 

Grags_1977

Ultra Cool Member
Reaction score
32
Hey ZakkWylde thanks for the reply.

Unfortunatily, turning off my hero's attacks is not what I want to do. I want him to attack, just not automatically.
 

ZakkWylde-

New Member
Reaction score
14
You could probably make a trigger ... (with repercussions that I'm too tired to think through and that you may or may not be able to take care of...)

I know there is some ability you can give to your hero so that it can't attack. I know it has "Orc Burrow" in it...you should try teaching the hero "Cargo Hold (Orc Burrow)," and see if that is it.

Anyways, once you locate the proper ability (I know I've seen it somewhere in these forums):

If your hero takes damage from an enemy unit, then teach it that ability and order it to hold position.
Then, remove the ability (I THINK this will restore its attack) when you find it suitable.
 

inevit4ble

Well-Known Member
Reaction score
38
you can turn the acquisition range to 1, so a unit has to be on top of the hero for him to attack it automatically
 

ZakkWylde-

New Member
Reaction score
14
you can turn the acquisition range to 1, so a unit has to be on top of the hero for him to attack it automatically

Why not make this 0?

(In fact, using SHIFT, you can make the acquisition range negative...whatever that means--so maybe if you tried -.1, the hero wouldn't "acquire" any target, even if another unit were on top of the hero.)
 

Grags_1977

Ultra Cool Member
Reaction score
32
Changing the acquisition range is no good. The hero will still auto attack if attacked. But thanks for the replies.
 

inevit4ble

Well-Known Member
Reaction score
38
then you need trigger take detects "Unit is attacked", check if its the hero, and order it to stop

Possibly detects damage rather, not sure when the unit will react
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
Setting the aquisation range to 1 really does the job. I did it in quite some maps.
But this only works for melee heroes.
 

Grags_1977

Ultra Cool Member
Reaction score
32
Mines a single player RPG. I really don't think Aqui..:confused: range is the answer here. As when my hero is attacked he will automatically attack back. I only want him to attack when given an order by the user.

Auto Attack is pretty much dealt with tbh. As the 'Worker Classification' and 'Can Flee (False)' does the job.

And as the case in EVERY senerio with World Editor (especially in my case) with every step closer to victory a new problem occurs.

I think the only way around it. Is it to create a blank transparent icon and use that. BUT! I have no idea where to begin there either :'(
 

Smitty

Member
Reaction score
20
Try disabling all attacks as standard, then use 'a unit is given a specific order' check that the order is to attack a unit, and enable attack 1. Pretty sure you can do this easily enough in GUI.
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
Try disabling all attacks as standard, then use 'a unit is given a specific order' check that the order is to attack a unit, and enable attack 1. Pretty sure you can do this easily enough in GUI.

You cannot give a unit an attack order if the unit does not have an attack.
 

Smitty

Member
Reaction score
20
hmm, then try using 'a unit is attacked' check the attacking unit, and tell it to stop. Then, if given an order to attack a unit, disable that trigger.
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
but his units would still try to chase their targets, they would run around like crazy but not be able to attack.
That would make it even worse i think.
 

TheOverWhelm

Member
Reaction score
16
Don't do a "Is attacked" and "Stop"
Lags horribly due to the game update speed then the trigger saying "Bitch no". Prime example is Solar Conquest , if you've played that

You can do something like
If Unit Paused==false then
Pause Unit
endif
with some sort of event then..

Event- Unit is Selected
Unit is THIS then
If Unit Paused then
unpause unit and add to Unitgroup
endif

Unit is Attacked
Unit in Group
Order Unit to Hold Position.

[What could be better is if you had a timer that waits like, .2 seconds then does it. That way you can prevent Game Update->Hold lag]

Event - Unit is deselected
Event - Unit changes ownership
Yadada, possible events
Condition - Unit in UnitGroup
Remove Unit from UnitGroup

Only way that comes to mind
 

Sonic

New Member
Reaction score
10
Hey, it so easy to do :
1. Create the ability based of Permanent Invisibility
2 Edit Auto- Acquire attack to false
3 Edit Duration to negative or higher value
4 Add this ability to turn off auto-attack and remove to turn on
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top