[ZScript] floor/ceiling move stuff

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!)

[ZScript] floor/ceiling move stuff

Postby gwHero » Wed Nov 22, 2017 1:07 pm

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?
User avatar
gwHero
Be your own Siddhartha
 
Joined: 08 May 2017
Location: The Netherlands
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: Intel with Vulkan Support

Re: [ZScript] floor/ceiling move stuff

Postby gwHero » Fri Nov 24, 2017 5:48 am

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:
Code: Select allExpand view
      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);
      }

[Edit](Corrected example checking the Z point)
User avatar
gwHero
Be your own Siddhartha
 
Joined: 08 May 2017
Location: The Netherlands
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: Intel with Vulkan Support


Return to Scripting

Who is online

Users browsing this forum: Enjay and 3 guests