ReplaceTextures

void ReplaceTextures (str oldtexturename, str newtexturename [, int flags]);

Usage

Replaces all occurences of oldtexturename with newtexturename.

Parameters

  • oldtexturename: the texture being replaced.
  • newtexturename: the new texture to be applied.
  • flags: the following flags are supported for this function and can be combined using the logical or operator | :
  • NOT_BOTTOM: Do not change any bottom textures on walls.
  • NOT_MIDDLE: Do not change any middle textures on walls.
  • NOT_TOP: Do not change any top textures on walls.
  • NOT_FLOOR: Do not change any floor textures.
  • NOT_CEILING: Do not change any ceiling textures.

Examples

The following script changes the generic floor into blood after 60 tics:

script 1 OPEN
{
  Delay(60);
  ReplaceTextures("FLOOR0_1","BLOOD1");
}

If used in a correct way, this feature can be used to scare the player (eg. if the walls turn into a mess of gore after pressing a certain switch).

This article is issued from Zdoom. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.