From ZDoom Wiki
Jump to navigation Jump to search

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


Replaces all occurences of oldtexturename with newtexturename.


  • 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.


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

script 1 OPEN

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).