This is a dynamic Shader Tutorial, which return the currently loading screen from the map which do you play. I think with this you can make some awesomes desings.
1. Before you do anything, copy this Function into your Code.
getLoadingScreenShader()
{
return "loadscreen_"+getdvar("mapname");
}
2. After that put his into your Init() Function, to precache the shader.
precacheshader(getLoadingScreenShader());
3. Now you´re finish. You can use your shader as any other shader. Here are an example.
This is my normal Test Shader:
self.hud_element = self createRectangle("CENTER", "CENTER", -100, -200, 600, 300, (1, 1, 1), 1, 1, "white");
Now I modify the shader which was in the normal form
"white".
self.hud_element = self createRectangle("CENTER", "CENTER", -100, -200, 600, 300, (1, 1, 1), 1, 1,
"white");
Replaced your return Function with "white".
self.hud_element = self createRectangle("CENTER", "CENTER", -100, -200, 600, 300, (1, 1, 1), 1, 1,
getLoadingScreenShader());
And that´s it
You have a dynamic Loadingscreen Hud Element.