Mindustry

Mindustry

Not enough ratings
Unit Parking
   
Award
Favorite
Favorited
Unfavorite
Tags: schematic
File Size
Posted
Updated
338.000 B
1 Jan, 2021 @ 12:00am
10 Jan, 2021 @ 1:00am
3 Change Notes ( view )

Subscribe to download
Unit Parking

Description
"Pins" all units of a specified type to a location, by gathering them at a configurable distance in front of the processor. Works similarly to the Command Center's rally function. Parked units will attack enemies.

How to use
  1. Build behind the desired location, rotating the schematic so that the switch faces away from the direction in which you wish the rally point to be.
  2. Edit logic and select desired unit type in Unit Bind, and (optional) configure distance ("dist" variable).
  3. Press switch to activate.
  4. If you change the distance again, toggle the switch off and on to cause changes to take effect.

Schematic code:
bXNjaAF4nAEtAdL+AAEAAgIABG5hbWUADFVuaXQgUGFya2luZwALZGVzY3JpcHRpb24AAAIABnN3aXRjaAAPbWljcm8tcHJvY2Vzc29yAAAAAgAAAAAACgADAQAAAAEOAAAA1HicVZBLcsMgDEDJqjOcQkeIu8rSy15DDkrtDB9XQAOnT2X8mw6CGZ4eEnBR6uKf2c1wA/rJaIELXHUkHwNDfElM6T520JPHwZLR/2QRHmgj6TxM3kD/sMiyYTTIQJ5cBfTrdFi+CG0a4QrdmtP5HnziYMGFX1o6c5WsjDOTkL8pzVuxdV2VdpEO0L6wxkYiJTBTTNB97i8o5wPKzurJqg4zxDyAKaL2aZxiOVAVs6FmuWwXawlpcZDaYiPLMd7riHqwvZDIWsmXq4/tCkq9339g44FbAU8LfHs=

Uses
  • Sorting units by type
  • Gathering specific unit types for easier commanding
  • Holding specific unit types back from attacking
  • Positioning long range units behind short range units
  • Overriding Command Centers for specific unit types
  • Moving units that ignore Command Centers, such as Monos, Polys, or Megas
  • Recalling units you're having trouble locating due to logic control problems
  • Overriding other logic during testing

Logic
Overrides most other logic by issuing move commands to bound units very frequently.
jump 8 equal rx 0 sensor sw switch1 @enabled jump 8 equal sw false ubind @flare uradar enemy any any maxHealth 0 1 enemy ucontrol move rx ry 0 0 0 ucontrol targetp enemy enemy 0 0 0 jump 1 always 0 0 set dist 12 sensor x switch1 @x sensor y switch1 @y op sub dx x @thisx op sub dy y @thisy op mul dx dx dist op mul dy dy dist op sub rx @thisx dx op sub ry @thisy dy
7 Comments
чемодан с котами 22 Apr, 2021 @ 5:31am 
... programmatically
killall -q  [author] 21 Apr, 2021 @ 8:02pm 
Click on the Command Center to bring up its mode selection menu.
чемодан с котами 21 Apr, 2021 @ 4:34pm 
Is there away to actually switch the Command Center between Attack and Rally?
lammaer 7 Mar, 2021 @ 1:02pm 
Clever idea, good execution, real QoL mod. Well done, this is just what I needed!
Extra props for posting the schematic, for non steamers!
PeLeSki 6 Jan, 2021 @ 3:14am 
Thanks! I'll take a look
killall -q  [author] 5 Jan, 2021 @ 7:22pm 
For larger units, you can increase the approach radius, so that they will stay farther from the processor, or you can use the distance parking logic.
PeLeSki 5 Jan, 2021 @ 7:19pm 
I like it a lot. The only problem I find is that units crowd over the switch and I can't get to it to turn it off. Is there any way of getting easier access to the switch if you have a lot of units on it?