[ACS] How to clean a sector's special?

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
Ravick
Posts: 2051
Joined: Sun Aug 22, 2010 10:59 pm
Location: Tubarão, Brasil
Contact:

[ACS] How to clean a sector's special?

Post by Ravick »

Hi there.

How can I change a sector's special to none (or to another one) via ACS? I took a look at Generic_Floor and Floor_TransferNumeric, but both ways to do that seems kinda 'hacky'. I mean, in the sense that these functions doen't seem to have be created to do just that. Is there a 'legit' way to take out a special from a sector?

Thanks in advanced. :)
User avatar
Tormentor667
Posts: 13556
Joined: Wed Jul 16, 2003 3:52 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia (Modern GZDoom)
Location: Germany
Contact:

Re: [ACS] How to clean a sector's special?

Post by Tormentor667 »

Depending on the special you could do a workaround with the “Actor enters sector” thing and remove that later.
User avatar
MFG38
Posts: 414
Joined: Sun Apr 14, 2019 8:26 am
Graphics Processor: nVidia (Modern GZDoom)
Location: Finland
Contact:

Re: [ACS] How to clean a sector's special?

Post by MFG38 »

I know that for lines, you can do SetLineSpecial(lineid,0) or ClearLineSpecial(). It's admittedly odd that no similar (easy) method exists for changing sector specials.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49238
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [ACS] How to clean a sector's special?

Post by Graf Zahl »

Simple answer: You can't. The special gets used to initialize several independent properties. What you have to do depends on what effect you want to clear.
User avatar
Ravick
Posts: 2051
Joined: Sun Aug 22, 2010 10:59 pm
Location: Tubarão, Brasil
Contact:

Re: [ACS] How to clean a sector's special?

Post by Ravick »

Thanks, guys. :)
Graf Zahl wrote:Simple answer: You can't. The special gets used to initialize several independent properties. What you have to do depends on what effect you want to clear.
Hum... after the initial stuff, could it be changed? I mean, any chances of a suggestion of some "ClearSectorSpecial" get yes'd?

___

BTW, what I was aiming was the take out some "Scroll" specials from some sector's floors. But I managed to do it just by raising some 3D floors that 'hide' the original sector's floors.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49238
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [ACS] How to clean a sector's special?

Post by Graf Zahl »

See, that's why I was asking.
The damage specials get translated to a sector damage record.
The scrollers get translated to scroller thinkers
The secret bit gets translated to a sector flag.
What's left is the Heretic wind specials and a few special items that remain in the special field for the duration of the level.

To clear a scroller you have to use the Scroll_Floor special - in fact when you want to manipulate a scroller at play time you also should use it to start the scroller instead of using the Hexen sector specials.
User avatar
Ravick
Posts: 2051
Joined: Sun Aug 22, 2010 10:59 pm
Location: Tubarão, Brasil
Contact:

Re: [ACS] How to clean a sector's special?

Post by Ravick »

It does indeed sound as more work then it worths, as it would serve almost always just for some aesthetic scripting. And specially if mappers usually will be able to use 'kludges do 'disguise' the sectors, just as I've made with the 3D floors.

I'll keep in mind the tip to use Scroll_Floor when I intent to change it later.

Thanks. :)
Post Reply

Return to “Scripting”