4/3/2023 0 Comments Mindustry unit radar![]() ![]() You can either have each processor create their own flags, or you can have a central processor that flags units, then your other processors only read flags, not set them. ![]() You could then give it a flag (the rand Operation is handy for this), and only perform control actions if the bound unit's flag is the one you provided. At a basic level, you can check if a unit has been flagged or not by another processor by checking if its flag is equal to 0, since 0 is the default. This can be achieved by flagging your units. It is likely you will want certain amounts of certain unit types performing certain actions. Tips: Flags are extremely powerful when organizing your units. The visual flag indicator on the unit may not display the flag correctly. You may set a unit's flag to any decimal or integer number. Value = An integer or decimal value to be assigned as the flag of the bound unit.ĭetails: By default, all units' flags are set to 0. (no label) = Control Action for bound unit(s) to perform. Here are examples and explanations of each Control Action that has at least 1 input/output: This is because the ucontrol function must potentially be able to provide inputs/outputs for the Control Action having the most, which currently is build. Many Control Actions will have unused inputs/outputs. Within - check if currently bound unit is within X tiles from a spot on the map. GetBlock - 'scan' a building at a spot on the map. Must be within proximity of spot.įlag - Sets the "id" (flag) of the the currently bound unit.īuild - construct X building at a spot on the map with X rotation and X configuration. PayTake - picks up either buildings or units at current location. PayDrop - drop payload at current location. ItemTake - takes X amount of X item from X building. ItemDrop - gives X amount of the currently held item to X building. Targetp - aim at a particular unit on the map. PathFind - tells the unit to move along the path used by default ally ground troop ai to reach a enemy spawn zone. Does not provide path-finding around obstacles.īoost - enable/disable boost of a unit capable of boosting. Does not provide path-finding around obstacles.Īpproach - move to exactly X tiles away from a spot on the map. Stop - Tells a unit to stop executing any move, approach, or pathFind functions. Summary: It tells the currently bound unit to perform an action.ĭetailed: There are 16 Control Actions available in the ucontrol function: This can be achieved with flags, which I'll cover in the ucontrol section. The most efficient method I found is to bind to all units of that type but control only the amount desired. While it is possible this way, remember that only 1 unit can be bound at a time, which means any instructions would need to be repeated after each bind. How do you bind to X amount of units instead of 1 or all? Someone told me you can just repeat the ubind function X times in a single cycle. If you were to have multiple processors using this method however, you would notice that both processors may try to control the same unit, because there is no function to check if a unit is already bound elsewhere, but there is a function to check if it is controlled. Tips: A quick and dirty way to control only 1 unit of a given type is to check if the processor is currently bound to something (Jump X not null). When a unit is unbound, it can still be controlled for a few seconds, it doesn't cut the connection instantly. The only way to unbind a unit is if the processor is destroyed, the unit is destroyed, or if the processor binds to a different unit. In terms of unit state, think of it as "bound = the ability to be controlled" and "controlled = currently being told to do something by a bound processor." There is no function that "unbinds" a unit. Also, a unit can be bound and controlled by as many processors as you want simultaneously, which may result in undesired behavior. When ubind is run with the same unit type as the already bound unit, it will bind to a different unit of that type. Use the variable to reference the currently bound unit. A processor may only be bound to 1 unit at a time. Summary: It 'connects' the processor to a unit of the given type.ĭetailed: The distance between the unit and the processor does not matter. Can be any manufactured unit, such as or does it do? ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |