I'm currently working on a mod/map pack that uses procedural generation for certain parts of its levels.
So far I managed to get random textures by using proxy textures which will be replaced on level load.
The random parts of the level are grids of sectors which each have a unique ID/Tag.
At the moment the script raises all sectors that will form walls or areas the player should not be able to walk on.
Since the random part of the level is a grid I have to make all lines doublesided (I need to assign a texture to bottom-front and bottom-back - sector floors are raised)
What I want to do is to set the line orientation so that all lines point "outwards" and become single sided in order to use shadowmaps in those sections.
I looked through the ACS documentation and searched the forums but couldn't find a way to do it. Perhaps I am looking at the problem from the wrong angle. Any help is much appreciated...
A primitive Version of the ACS Code - but you'll get the idea:
Code: Select all
#include "zcommon.acs"
int ran_height[3] = {8, 16, 24};
Script "BuildLevel" OPEN
{
for (int i = 1; i < 122; i = i+1)
{
ChangeFloor(i, "TIL002"); //change floor texture
ChangeCeiling(i, "TIL001"); //change ceiling texture
if((i % 9) == 0)
{
Floor_RaiseInstant(i, 0, ran_height[random(0, 2)]); //raise the floor
ChangeFloor(i, "CRAT001"); //change floor texture
}
}
}