Thing type 1504, ATZ Target, is a type of Thing that is used for puzzles in Azure Temple Zone. It is a translucent crystal that lights up for 45 tics (slightly over a second) when hit by Trapgoyle fire. In Azure Temple Zone, Trapgoyles must be pushed around so that their flames will light up nearby targets. If all targets within a certain area are lit at once, they will stay lit permanently and a door will open that allows the player to progress. By itself, the ATZ Target will only light up when hit – all other effects have to be set up in the map via linedef executors.
The ATZ Target is in fact vulnerable to all types of attacks, not just Trapgoyle fire. This includes being touched by a player (which is why all targets in Azure Temple Zone are sealed off from the player) as well as an Armageddon Shield blast. When hit by any means, the ATZ Target will enter its
DeathState, in which it plays a "ding" sound and lights up for 45 tics. Since the target has lost its only health point in this state, it can no longer be hit. Thus, flames will pass through it, potentially hitting other targets behind it. After the 45 tics are over, the target "resets" by disappearing and spawning a new target in the same location, which can be hit again.
This section explains how to set up an ATZ Target (or a group of them) so that they can behave the same way as seen in Azure Temple Zone.
While lit up, the
MF_PUSHABLE flag is added to the ATZ Target. This allows it to be detected by linedef executor triggers that check for the presence of pushable Objects, namely linedef type 314 and linedef type 315. To set up an effect that is executed when all targets in a certain sector are lit, give that sector sector type 16 (to allow the sector to detect pushable Objects). Create a control sector, give one of its linedefs type 315 and tag it to the in-map sector containing the targets. Set the length of the linedef to the number of pushables that the in-map sector contains. The effect that should be triggered when all targets are lit can then be added to the control sector as a linedef executor. In Azure Temple Zone, a chime sound effect is played whenever doors are opened by targets. To replicate this, add a linedef with linedef type 414 to the control sector and set its front upper texture to
The permanently lit state of the targets is called
S_TARGET_ALLDONE. It will not be reached automatically; instead, it must be set via linedef type 425. To make the targets switch to this state after all targets are lit, an invisible, invisible FOF must first be created to trigger the state change. Create a new control sector, give one of its linedefs linedef type 223, and tag it to the in-map sector containing the targets. Set the heights of this control sector to appropriate places depending on the height of the in-map sector; importantly, make sure the ceiling height of the control sector is below the floor height of the in-map sector containing the targets; this prevents the invisible, intangible FOF from triggering the targets before they are ready to be triggered. Give the control sector sector type 16 to allow the FOF to detect pushable Objects.
The invisible, intangible FOF should now exist in the map and be able to trigger the targets, but it is not yet able to do so at the right moment. To do this, find the control sector with linedef type 315 that was created earlier for the targets, add a linedef with linedef type 404 to it, and tag it to the control sector with linedef type 223 (the invisible, intangible FOF's control sector). Set the ceiling height of that control sector so it is at or above the floor height of the in-map sector containing the targets. In-game, this will cause the invisible, intangible FOF to move upwards when all targets are lit, triggering the sector special of the FOF.
Now all that remains is to change the state of the targets themselves to
S_TARGET_ALLDONE. This can either be done on the invisible, intangible FOF's control sector, or on a separate control sector; it does not matter which one is used. On the chosen control sector, give one of its linedefs type 425, and tag it to the invisible, intangible FOF's control sector. Set the front upper and middle texture fields of this linedef to
_ALLDONE, respectively. The targets should now be permanently lit when all of them have been lit at once. Note that
S_TARGET_ALLDONE removes the
MF_PUSHABLE flag from the ATZ Target, preventing it from being triggered again once it has been permanently lit.
|States – MT_TARGET|
|State||Sprite prefix||Frame||Duration (tics)||Action||Var 1||Var 2||Next state||Full brightness?||Translucency|
|Thing types – Miscellaneous||[view]|
|Air Bubble Patch • Level End Sign • Star Post • Chain (Swinging) • Chain (Spinning) • Hidden Chain • ATZ Target|