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,463
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,463
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,463
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.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top