Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Herska

Make a deep water sector non-deep water?

Recommended Posts

I'm trying to add a secret in my map that raises a set of underwater stairs to a higher floor, making another area accessible (illustrated).


Sorry about the typo(s)

My problem is, I can't make the deep water effect go away from the floor as removing the deep water things via scripting doesn't remove the effect.

Do you know any workaround on how to make a underwater sector not-underwater?

Share this post


Link to post

The OP mentioned his attempt at "removing the deep water things via scripting", so I don't think he's using Boom.

Share this post


Link to post

I'm using Zdoom in Hexen format. Is this a problem?





I simplified the area to first understand how to make a working script like that.

My problem now is that the script can't pick up the moment where the floor height hits -48 and thus can't enter the "inner script", as I like to call it.

I think it has something to do with the part rectangled in the picture of the script. What should it read there and why?

E: resized the script picture

Share this post


Link to post

Did you try Kappes Buur approach? Or is 3D floors just not an option? If you can upload your MAP and someone can check out the problem because it's difficult to see exactly whats going on without having the map.

Share this post


Link to post
Pottus said:

Did you try Kappes Buur approach? Or is 3D floors just not an option? If you can upload your MAP and someone can check out the problem because it's difficult to see exactly whats going on without having the map.


Map here

I didn't include the huge texture wad files, so some textures display invalidly. All the scripts and essentials are in there, though.

I'm new to 3D floors, can they be done with Zdoom in Hexen format? I'd rather not use that approach, I would rather ease myself into 3D floor mapping in a different map or section so I don't take more I can chew.

Edit: The map is MAP06 so skip in there with idclev06.

Share this post


Link to post

God. Just god.

I made a script displaying floorz in real time and guess what? The script couldn't reckognize the point where the value hits -48 because the value grows too fast (I think it doesn't go through every integer when it grows too fast and skipped -48 in this case)

Lowered the sector raise speeds from 30 to 10 and it works like a charm.

Good thing this didn't bug me enough to stop me from working for 2 days. Oh well.

Share this post


Link to post

Universal rule for floating point (and fixed point too) is to never test for equality. Making it slower worked yesterday, but what about tomorrow on a different machine ? It is a fragile solution, that will fail again.

Fix it permanently.

As it only moves one direction ...

if( floorz >= -48 ) ...

Then it will always stop, even if it hits numbers like
-48.5, -48.23, -48.02, -47.9 ...

or you can cheat the test a little lower and force the result

if( floorz >= -48.001 ) {
floorz = -48.000
set floor height to floorz;
...
}


If it moved in two directions, then it needs a separate test for each direction. Testing floating values to hit a narrow window is also fragile and is to be avoided.

Share this post


Link to post

You have a good point there Wesley I tried this and it is the best way, but you forgot to mention he will need to remove the bit shift operator from lines where GetFloorZ() is used.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×