ChangeSky: Difference between revisions

From ZDoom Wiki
Jump to navigation Jump to search
mNo edit summary
m (formatting)
Line 1: Line 1:
void '''ChangeSky'''(str ''sky1'', str ''sky2'');
void '''ChangeSky''' (str ''sky1'', str ''sky2'');


Useful in conjunction with [[SetSkyScrollSpeed]].
Useful in conjunction with [[SetSkyScrollSpeed]].
Line 5: Line 5:
== Usage ==
== Usage ==


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


== Examples ==
== Examples ==
Line 11: Line 11:
This simple script changes the Doom 2 default to the red sky from Doom 1.
This simple script changes the Doom 2 default to the red sky from Doom 1.


script 1 OPEN
script 1 {{SType|Open}}
{
{
ChangeSky("SKY3","SKY3");
[[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:
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
script 1 {{SType|Open}}
{
{
Delay(400);
[[Delay]](400);
ChangeSky("FWATER1","FWATER1");
[[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.
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 ==

* [[SetSkyScrollSpeed]]


[[category:ACS Level alteration functions]]
[[category:ACS Level alteration functions]]

Revision as of 01:21, 11 February 2013

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