• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

How to remove worker icon?

Status
Not open for further replies.
Level 13
Joined
May 10, 2009
Messages
868
but i need to have this clasification and i dont want this icon and the number

Then, remove their unit classification from the object editor, and as soon as a worker spawns in your map, you add the worker classification through triggers. They won't be attacking anyone automatically, and also that IDLE icon won't show up.

  • Unit - Add classification of A peon-type unit to (Triggering unit)
 
Level 13
Joined
May 10, 2009
Messages
868
You don't necessarily need to put every single unit type in a trigger. You could, for example, create an ability that has no effect (item armor bonus - set its value to 0), and add it to every unit that you want to be classified as a worker. Then, just check if a unit has that ability when they spawn or the game starts.

I also noticed that only adding the worker classification to the unit via triggers will not work correctly until they do something (hold position, move, be paused, etc...).

Here's what I've done:
When the game starts

  • Classify as worker init
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Entire map)) and do (Actions)
        • Loop - Actions
          • Custom script: local boolean paused
          • Set unit = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Worker for unit) Greater than 0
            • Then - Actions
              • Unit - Add classification of A peon-type unit to unit
              • Custom script: if GetUnitCurrentOrder(udg_unit) == 0 then
              • Custom script: set paused = IsUnitPaused(udg_unit)
              • Custom script: call PauseUnit(udg_unit, true)
              • Custom script: if not paused then
              • Custom script: call PauseUnit(udg_unit, false)
              • Custom script: endif
              • Custom script: endif
            • Else - Actions
For when a unit spawns
  • Classify as worker spawn
    • Events
      • Unit - A unit enters (Entire map)
    • Conditions
    • Actions
      • Custom script: local boolean paused
      • Set unit = (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Worker for unit) Greater than 0
        • Then - Actions
          • Unit - Add classification of A peon-type unit to unit
          • Custom script: if GetUnitCurrentOrder(udg_unit) == 0 then
          • Custom script: set paused = IsUnitPaused(udg_unit)
          • Custom script: call PauseUnit(udg_unit, true)
          • Custom script: if not paused then
          • Custom script: call PauseUnit(udg_unit, false)
          • Custom script: endif
          • Custom script: endif
        • Else - Actions
For some reason, it's not showing the white spaces in the beginning of those custom scripts.
Anyway, as I said before, you either need to move your units or pause them to remove entirely a glitch where they would still attack nearby units.

Object Editor:

As you said, there are many units in your map that should be considered as workers. So, in order to speed up a little bit your "add ability to many units" in the object editor: I suggest that you check the ID of the ability, which you're going to add to the units.

S5aFPDK.png


After checking the ID, copy it into your Ctrl + C, but don't forget to add a comma before it - ,A000.

uIOn1vm.png


Now, all you have to do is, select a worker unit in the object editor, then its ability field. Hold Left-Shift and press Enter, hit Right Arrow key, then Ctrl + V. Hit Enter again and proceed to the next unit.
 

Attachments

  • No Idle Icon.w3x
    19 KB · Views: 41
Status
Not open for further replies.
Top