ChangeSky (ZScript)

From ZDoom Wiki
Jump to navigation Jump to search
Note: This feature is for ZScript only.

struct LevelLocals
Void ChangeSky(TextureID sky1, TextureID sky2);


Changes the sky textures of the map, similar to the ChangeSky ACS function. Unlike it however, Level.ChangeSky() directly uses TextureIDs instead of texture name strings.


  • TextureID sky1
The TextureID of the first sky layer.
  • TextureID sky2
The TextureID of the second sky layer, useful in maps that use a double sky, have lightning, or have sectors of the type 200.

To use this function to simply change the sky textures on a map, like the equivalent ACS function, you need to retrieve the TextureIDs of the textures you want to change the sky layers to, to do that you need to write the ChangeSky() function like below:



Below is the code for a special Zombieman who when spawned, changes the levels' sky1 to the FWATER1 texture, and sky2 to NUKAGE1.

Class SkyChangingZombieman : Zombieman
	Override Void PostBeginPlay()