ACS get lines that form a sector and manipulate them

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
hg82
Posts: 13
Joined: Thu Mar 22, 2018 11:40 am

ACS get lines that form a sector and manipulate them

Post by hg82 »

Hello everyone,

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
		}
	}
}
Attachments
This is how the level looks...
This is how the level looks...
User avatar
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Re: ACS get lines that form a sector and manipulate them

Post by Marisa the Magician »

I don't think doing that is possible.
User avatar
hg82
Posts: 13
Joined: Thu Mar 22, 2018 11:40 am

Re: ACS get lines that form a sector and manipulate them

Post by hg82 »

Marisa Kirisame wrote:I don't think doing that is possible.
I was afraid of that answer... But in the meantime I figured this much.
Post Reply

Return to “Scripting”