Cloaking

From Staredit Network Wiki
Revision as of 23:38, 20 March 2015 by DevliN (Talk | contribs) (1 revision imported: Restoring SC1 backup)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Cloaking refers to the act of concealing a unit. Cloaked units are generally invisible to players that do not own or share vision with them. The exceptions are cloaked buildings (which are fully visible when seen in fog of war) and units near detectors.

Natural cloaking

A unit which cloaks is invisible to players which do not have vision of the player who owns it or a detector nearby. Several units have the ability to cloak by default:

The non-Protoss units cloak via a spell, which drains 18/256 energy per frame (not including energy regeneration). Ghosts in particular have a special per-unit AI which makes them not attack while cloaked. These units are easily cloaked: either create them cloaked (using the Create Unit with Properties trigger action), or attack them with the ability researched (and make sure they have infinite energy).

Arbiters

Protoss Arbiters have the ability to cloak any unit under their field, with the exception of themselves and other Arbiters. There are probably extended units which also have this ability, but as of the time of this writing, no such units are known.

Burrowed Zerg units are also technically cloaked, but they are immobile while burrowed. Any Zerg unit that is able to burrow can be cloaked manually or via triggers by unburrowing as soon as the unit enters an Arbiter's cloaking field. To cloak via triggers, create an Arbiter over a burrowed unit and Order the burrowed unit to move to any location (usually the one you used to create the Arbiter). This method of cloaking will only work until the unit unburrows again. A cloaked Drone uncloaks when it starts morphing into a building, even if the building is canceled and the Drone recovered.

Disabling

StarCraft's "Set Doodad State" trigger action allows mapmakers to enable or disable doodad units, like the Installation tileset's doors and floor traps. Enabling and disabling such units initiates unique behaviors, like the opening of doors and the deactivation of traps.

Third-party map editors, such as SCMDraft 2, allow mapmakers to use this trigger action to enable and disable non-doodad units. The effects of disabling a non-doodad unit tend to vary depending on what unit is used, but the most common results are the unit becoming cloaked or the game crashing.

A full list of units that can be cloaked without (consistently) crashing can be found in the Set Doodad State article.

Cloaked Buildings

Cloaked buildings may not appear to be cloaked at first. If a disabled building looks normal but cannot be selected in-game, then it needs to be detected and then un-detected to be fully cloaked. There are at least three ways to do this.

  • Create a Detector unit for the human player, and then remove it.
  • Give the cloaked building to the human player, and then give it back to the computer player.
  • Turn on shared vision between the human player and the building's owner, and then turn shared vision back off.

Note that in addition to being detected and un-detected, Protoss buildings must also be powered by a Pylon or enabled before they can cloak.

The triggers listed below show the specific actions for each of the three methods. The triggers should run for the players that the building should appear cloaked to. The conditions can be whatever the mapmaker desires.

StarCraft Trigger [template]
Description:
Creating and removing a detector. (Any detector can be used in place of a Protoss Observer.)
Players:
  • <Players that should see the building as being cloaked>
Conditions:
  • <Anything the mapmaker desires>
Actions:
  • Create 1 Protoss Observer at <location> for Current Player.
  • Wait 0 milliseconds.
  • Remove all Protoss Observer at <location> for Current Player.

StarCraft Trigger [template]
Description:
Giving and returning the building.
Players:
  • <Players that should see the building as being cloaked>
Conditions:
  • <Anything the mapmaker desires>
Actions:
  • Give 1 <cloaked building> owned by <building's owner> at <location> to Current Player.
  • Wait 0 milliseconds.
  • Give 1 <cloaked building> owned by Current Player at <location> to <building's owner>.

StarCraft Trigger [template]
Description:
Turning shared vision on and off.
Players:
  • <Players that should see the building as being cloaked>
Conditions:
  • <Anything the mapmaker desires>
Actions:
  • Execute AI Script "Turn ON Shared Vision of <building's owner> for Current Player".
  • Wait 0 milliseconds.
  • Execute AI Script "Turn OFF Shared Vision of <building's owner> for Current Player".

Example: Cloaked Beacons

Normal beacons: Cloakbeacons01.png

Cloaked beacons (with vision): Cloakbeacons02.png

Fully cloaked Beacons (without vision): Cloakbeacons03.png

Cloaked Bunkers

Terran Bunkers can be cloaked using any of the three methods described above. However, mapmakers that plan on using cloaked Bunkers should be aware of their quirks:

  • Disabled Bunkers cannot load or unload units.
  • Units in a disabled Bunker can still attack.
  • Disabled Bunkers block ground movement, just like other cloaked buildings.
  • If a disabled Bunker is destroyed, the units that were inside will be lost.

There is also a trick for creating Invisible Bunkers that can be walked and built over.

Burning Cloaked Buildings

A building's fire animation shows even when the building is cloaked/disabled. This is a useful visual effect that can be implemented using Terran or Protoss buildings (depending on the desired fire color).

A burning cloaked Bunker:

Burnbunker.png

A burning cloaked Photon Cannon:

Burncannon.png