How to discover the new state in a texture changed (UDMF)

Thu Sep 16, 2021 6:33 pm

Let's say I need to check a floor where the texture was changed, but I don't know which texture it was changed to, as this new texture is in a list of 5 textures, I know the names of the 5... but I don't I know which one, which of the 5 textures that was used to change the floor, if I know which one, then I check which one it is, and a weapon appears on the green floor...

Re: How to discover the new state in a texture changed (UDMF

Fri Sep 17, 2021 3:07 pm

Unless I am totally overthinking it and missing a simple function... (which I am known to do, all the time). Also, I am assuming this is in ZScript because I don't know any way to access this sort of stuff in Decorate.

You can access information about the current sector of an actor with the CurSector variable, which accesses a sector struct:

That page hasn't been updated in a while, but I looked in the full entry from gzdoom.pk3/zscript/mapdata.zs, and in there I can see:
native TextureID GetTexture(int pos);

And from looking in the source for a similar thing earlier, "pos" selects the floor or ceiling - 0 for floor, 1 for ceiling. I don't know exactly how to work with TextureIDs though. Dunno if it can be mapped to a string directly or not.

Also, an important note - something derived from MapSpot probably won't be able to access CurSector as it has the flags NOBLOCKMAP and NOSECTOR

Hope this helps though.