Understanding: THING Type 9990 Bridge Custom

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
Syfo-Dyas
Posts: 214
Joined: Fri Dec 17, 2010 12:50 pm
Location: Another Huxleyian Dystopia

Understanding: THING Type 9990 Bridge Custom

Post by Syfo-Dyas »

I am trying to understand THING Type 9990.

At first I thought I would have to approach it as such:

Floor I am coming from will be a height of 0. Floor I am going to is a height of 0. The chasm in between those floors is -128.

So I figured I would need to set the Z Height to 0 to match the height of the floors I am passing from and moving to. Then I presumed the Radius would tell ZDOOM how wide the THING (virtual bridge) would be, and THICKNESS would relate to how thick it is vertically.

As fate would have it, this is not the case. First the THING THICKNESS has to be set and taken into consideration. Since I am setting mine to 1, my Z Height then needs to be about 127. That I understand, but what then is RADIUS for? No matter if I set it to 0 or 64, or what ever it doesn't seem to effect anything. How do I use it?

Thanks!

EDIT: I guess RADIUS does work as I thought it should. I just had too many THINGs in there to notice the changes. Stupid mistake. Sorry, you might just want to delete this post, unless of course another noob comes along that can make use of it.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: Understanding: THING Type 9990 Bridge Custom

Post by Gez »

I kinda regret I made this actor before UDMF was a reality, as it could have gone without the hacks used to fit the args within Hexen's silly byte-sized fields. It's mostly for the rotation.


Anyway. For reference, the [wiki=Classes:CustomBridge]documentation[/wiki] which everyone should read.
Syfo-Dyas wrote:Floor I am coming from will be a height of 0. Floor I am going to is a height of 0. The chasm in between those floors is -128.

So I figured I would need to set the Z Height to 0 to match the height of the floors I am passing from and moving to.
This is where your problem lies. The Z height is a relative value, not an absolute one. (Otherwise, since everything has by default a Z height of 0, everything would be at absolute height 0, meaning that they would be variously stuck in the floor or the ceiling depending on their position in the map and on level geometry.)

The way it works is simple: if the thing has the spawn ceiling flag, the Z height is subtracted from the ceiling height. Otherwise, it's added to the floor height. (Slopes are taken into account, by the way.)

Since your chasm's floor is at -128, and you want the bridge to provide a fake floor height of 0, you will need a Z height of 128 (minus the bridge's vertical thickness).
Syfo-Dyas wrote:Then I presumed the Radius would tell ZDOOM how wide the THING (virtual bridge) would be, and THICKNESS would relate to how thick it is vertically.
That's true. Note that an actor's height goes above the base. If its height is 32, then the bottom is at height 0 and the top at height 32. Which is why you have to subtract that from the Z-height.

A height or radius of 0 is invalid. The engine wouldn't be able to detect collisions with such non-dimensional actors. Therefore, if you set those first two parameters to 0, it is interpreted as "use default value". The default height is 2, and the default radius is 32, as indicated by the CustomBridge's DECORATE code. Do not try to create bridges with height or radius of 0! They will not work.
User avatar
Syfo-Dyas
Posts: 214
Joined: Fri Dec 17, 2010 12:50 pm
Location: Another Huxleyian Dystopia

Re: Understanding: THING Type 9990 Bridge Custom

Post by Syfo-Dyas »

Don't regret it, some of it are very lucky that ZDOOM 1.23 had support for such things. It's nothing compared to what Legacy had or what GzDOOM and ZDOOM 2.6.1 have, but compared to the old school method, this is above and beyond! Plus I get even place enemies on them which is an extra boon! Just what my project needed.

So thankx for the mistake/hack. :)
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: Understanding: THING Type 9990 Bridge Custom

Post by Gez »

Syfo-Dyas wrote:ZDOOM 1.23 had support for such things
I very much doubt it. That was added in 2008.
User avatar
Syfo-Dyas
Posts: 214
Joined: Fri Dec 17, 2010 12:50 pm
Location: Another Huxleyian Dystopia

Re: Understanding: THING Type 9990 Bridge Custom

Post by Syfo-Dyas »

Gez wrote:
Syfo-Dyas wrote:ZDOOM 1.23 had support for such things
I very much doubt it. That was added in 2008.
I'm not kidding, I have been testing things I'm working on for Odamex in ZDOOM 1.23 and GzDOOM in order to make sure everything is behaving as it should. ZDOOM 1.3 is handling THING type 9990 perfectly fine.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Understanding: THING Type 9990 Bridge Custom

Post by Graf Zahl »

9990 != 9991 (which Gez described)

9990 just takes 2 args, witdh and height.
Locked

Return to “Editing (Archive)”