In the ZScript folders of the gzdoom.pk3 there's already a lot of map/level stuff present.
Maybe this is more for the dev's to answer: is the floor/ceiling move stuff already suitable to use for modders or needs there more to be exposed?
[ZScript] floor/ceiling move stuff
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!)
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!)
-
- Posts: 360
- Joined: Mon May 08, 2017 3:23 am
- Graphics Processor: Intel with Vulkan/Metal Support
- Location: The Netherlands
-
- Posts: 360
- Joined: Mon May 08, 2017 3:23 am
- Graphics Processor: Intel with Vulkan/Metal Support
- Location: The Netherlands
Re: [ZScript] floor/ceiling move stuff
Did some more digging and got it working. Not tested with sounds yet, but the moving itself wasn't difficult after all. I'll put an example here in case more people are searching:
[Edit](Corrected example checking the Z point)
Code: Select all
SectorTagIterator sit = SectorTagIterator.Create(tag,null);
int secnum = sit.Next();
if (secnum > 0)
{
if (level.sectors[secnum].FloorPlane.ZatPoint(level.sectors[secnum].centerspot) == 0)
Floor.CreateFloor(level.sectors[secnum], Floor.floorMoveToValue, null, 1, 24);
else
Floor.CreateFloor(level.sectors[secnum], Floor.floorMoveToValue, null, 1, 0);
}