UDMF Custom Sector Fields - How to access them?

Ask about mapping, UDMF, using DoomBuilder/editor of choice, etc, 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.
User avatar
FFFFRRRR
Posts: 99
Joined: Sat Nov 04, 2017 3:33 am

UDMF Custom Sector Fields - How to access them?

Post by FFFFRRRR »

Hello!

I have always noticed that sectors in UDMF have the ability to store custom fields. In GZDoombuilder, it looks like there is a whole lot of different data that you can store in that.
Spoiler:
Now, if I define one of those fields, in what way can I access that data? Can I use them in ACS, can they only be retrieved with ZScript, do they have other purposes, or is that purely a GZDB organisation-type thing? I couldn't find anything on the wiki about it.
User avatar
NicoTheGoat
Posts: 17
Joined: Sun Dec 29, 2019 6:36 pm

Re: UDMF Custom Sector Fields - How to access them?

Post by NicoTheGoat »

Custom UDMF fields can be accessed through Get{Line,Side,Sector}UDMF{Int,Fixed} in ACS and GetUDMF{String,Int,Float} in ZScript.
User avatar
FFFFRRRR
Posts: 99
Joined: Sat Nov 04, 2017 3:33 am

Re: UDMF Custom Sector Fields - How to access them?

Post by FFFFRRRR »

Very nice, thank you!

Return to “Mapping”