DrawSwitchableImage

From ZDoom Wiki
Jump to navigation Jump to search

DrawSwitchableImage <#>, <image-off>, <image-on>, <x>, <y> [, {center|centerbottom}]
DrawSwitchableImage invulnerable, <image-on>, <image-off>, <x>, <y> [, {center|centerbottom}]
DrawSwitchableImage keyslot <#> [&& <#>, <image0>, <image1>], <image2>, <image3>, <x>, <y> [, {center|centerbottom}]
DrawSwitchableImage armortype <armor1> [&& <armor2>, <image0>, <image1>], <image2>, <image3>, <x>, <y> [, {center|centerbottom}]
DrawSwitchableImage <inventory_item> [&& <inventory_item>, <image0>, <image1>], <image2>, <image3>, <x>, <y> [, {center|centerbottom}]
DrawSwitchableImage weaponslot <#> [&& <#>, <image0>, <image1>], <image2>, <image3>, <x>, <y> [, {center|centerbottom}]
Draws a particular image if the player fills a given condition, such as having a particular item. The item may be any sub-class of Inventory. If the player is carrying the item then image3 is drawn, else image2 is drawn.

If a second item is specified with the && operator, an additional two images are required. In that case, image0 is drawn if the player is holding none of the items, image1 if the player is holding item1, image2 if the player is holding just item2, and image3 if the player is holding both.

Comparison operators can be used to check for a specific value of an item or armor.