ChangeSky

From ZDoom Wiki
Jump to: navigation, search

void ChangeSky (str sky1, str sky2);

Useful in conjunction with SetSkyScrollSpeed.

Usage

Changes the sky texture to sky1 and the second sky texture to sky2. Both textures must be the same height if doublesky is enabled. You may also use any flat, pname, sprite or internal graphic (such as TITLEPIC) in place of an actual texture.

Examples

This simple script changes the Doom 2 default to the red sky from Doom 1.

 script 1 OPEN
 {
   ChangeSky("SKY3","SKY3");
 }

This would work exactly the same in Doom 1, too. If you wanted to be wacky, you could set the sky to a flat after a few moments of play:

 script 1 OPEN
 {
   Delay(400);
   ChangeSky("FWATER1","FWATER1");
 }

After 400 tics, we get a beautiful vista of pixelated water. Note that the second parameter is redundant here because the water will tile over whatever is chosen.

See also