I see we have [wiki]GetActorFloorTexture[/wiki], [wiki]CheckActorFloorTexture[/wiki], and [wiki]CheckActorCeilingTexture[/wiki], but no GetActorCeilingTexture.
I've looked at the thread for the suggestion of GetActorFloorTexture and noted that Graf thought it could be added, but would have far less use cases.
I can see it sharing some use cases with GetActorFloorTexture, and I have a need for such a function myself.
GetActorCeilingTexture
Moderator: GZDoom Developers
-
- Posts: 219
- Joined: Wed Jan 08, 2014 8:40 am
- Graphics Processor: nVidia with Vulkan support
- Location: Germany
Re: GetActorCeilingTexture
Well, if you are checking for a specific texture you can simply do this:
However, if you need the name of any texture, this won't help you.
Code: Select all
TextureID Sky = TexMan.CheckForTexture("F_SKY1", TexMan.Type_Any);
If (ceilingpic == Sky)
A_Log("I am standing under the sky");
Else
A_Log("There's a roof above my head");
Re: GetActorCeilingTexture
I'm not checking for a specific texture; otherwise CheckActorCeilingTexture would be what I need.
Re: GetActorCeilingTexture
So what is your use case?
Re: GetActorCeilingTexture
My particular use case is for footstep sounds. I have a mechanic in my mod which is flipping gravity so that the player can walk on the ceiling. It would be nice to be able to see if, for example, the texture the player is walking on has the word "METAL" in it, so I can play a metallic footstep sound.
There are other use cases I can think of, like having projectiles act differently upon impact with both floors and ceilings depending on the type of surface, be it metallic, wooden, or anything like that.
There are other use cases I can think of, like having projectiles act differently upon impact with both floors and ceilings depending on the type of surface, be it metallic, wooden, or anything like that.