SwitchableDecorations ignore the Z distance

Sat Nov 28, 2020 6:43 pm

Considering the wiki documentations: Activation and USESPECIAL
Something is not wornkig as it should. This SwitchableDecoration sample just ignore the Z distance.
It's not a big problem to solve but I think it shouldn't happen that way.

Switch.pk3
You do not have the required permissions to view the files attached to this post.

Re: SwitchableDecorations ignore the Z distance

Sun Nov 29, 2020 2:57 am

Does it make any difference if CheckSwitchRange is added to the mapinfo? Because this sounds like typical vanilla behavior.

Edit: never mind that, seems like CheckSwitchRange only affects lines.

Re: SwitchableDecorations ignore the Z distance

Tue Dec 08, 2020 5:50 pm

Rachael wrote:The importance of simple examples in bug reports


Tue Dec 08, 2020 3:50 pm : "Not downloaded yet"

I need some feedback here. Is that a bug or i just did something wrong?

Re: SwitchableDecorations ignore the Z distance

Tue Dec 08, 2020 6:31 pm

Well, it happens that the people who could answer your question are busy - it's a rough year, probably even more rough this month in particular. So, though you probably didn't want to hear this, you're probably just going to have to wait.

Re: SwitchableDecorations ignore the Z distance

Wed Dec 09, 2020 1:11 am

What's there to test? Yes, the check is not z-sensitive. I know. Sorry, I currently really have no time working on GZDoom. All the little spare time I have goes into Raze at the moment but even that's not nearly what I'd like to do with these engines.

Re: SwitchableDecorations ignore the Z distance

Wed Dec 09, 2020 7:17 am

Yeah. This year never ends.

Graf Zahl wrote:What's there to test? Yes, the check is not z-sensitive. I know...

That really help me already. I can fix this unexpected behaviour with some changes in Actor Decorate.

Re: SwitchableDecorations ignore the Z distance

Wed Dec 09, 2020 12:36 pm

I don't know if it will help or not but you can use GetActorZ(0) in ACS to check the Z-height of the player and only do stuff if he is in the correct position.

e.g.
Code:
if(GetActorZ(0) < 96.0)
   {
      do stuff
   }

will only "do stuff" if the player (specifically his feet if I remember correctly) is below height 96.

Re: SwitchableDecorations ignore the Z distance

Wed Dec 09, 2020 2:40 pm

Something like that.
I like to use A_CheckProximity and A_CheckRange in Switch Idle state to give or remove the USESPECIAL flag.

Thank you all

Re: SwitchableDecorations ignore the Z distance

Mon Dec 14, 2020 6:12 am

A_checkRange has the same issue.