Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
cyber-menace

Rising Lava

Recommended Posts

I'm having a problem making a slightly advanced script. I have everything set up to create a rising lava trick, but when the line is supposed to switch to transfer heights it doesn't work! Right now I have a line in the dummy sector with an ID of 3 and Sector Tag 28 to transfer with but when my script:

SetLineSpecial (3, 209, 28, 0, 0, 0, 0);

Activates it doesn't work. If I start the level with that same ID 3 line set for Transfer_Heights it works, but not if I change it to that after the level has begun. Is there anyway to do a type of rising lava and Deep Water combo like I'm using now? If so how?

Share this post


Link to post
cyber-menace said:

I'm having a problem making a slightly advanced script. I have everything set up to create a rising lava trick, but when the line is supposed to switch to transfer heights it doesn't work! Right now I have a line in the dummy sector with an ID of 3 and Sector Tag 28 to transfer with but when my script:

SetLineSpecial (3, 209, 28, 0, 0, 0, 0);

Activates it doesn't work. If I start the level with that same ID 3 line set for Transfer_Heights it works, but not if I change it to that after the level has begun. Is there anyway to do a type of rising lava and Deep Water combo like I'm using now? If so how?


Yes there is - I have done it after all (LTSD e4m8). You need to do the following:

Set the Transfer_Heights (28, 0) special on the line itself. (you don't need to give it a lineid and a setlinespecial)

You can't set a Transfer_Heights in-game, but what you need to do is set the floor height of the dummy sector equal to that of the real sector, and give it a non-lava flat (so it looks normal).

Then, give the dummy sector a tag as well (say, 29) and run this script when you want the lava to rise:

script 1 (void)           // rising lava

{
ChangeFloor (28, "LAVA1");
Floor_RaiseByValue (29, speed, height);
}
This changes the flat of the real sector to lava, and raises the floor of the dummy sector, thus producing the effect.

(If you want to use more than one sector it gets pretty complex, and calculations ensue - see E4M8 of LTSD to see how complex it is for 2-3 dozen sectors!)

Share this post


Link to post

I've already gone ahead and done this! There is one problem though! I have other sectors with different heights in the rising lava so I need to calculate the amount of time it takes for the lava to rise EXACTLY that high. It's quite hard.

Share this post


Link to post

I have another problem! If I use Delay (5) It starts rising to fast! If I use Delay (6) It rises to slow! I want to use Delay (5.5) But then it doesn't rise at all! Is there anyway to use a delay with decimals?

Share this post


Link to post
cyber-menace said:

I have another problem! If I use Delay (5) It starts rising to fast! If I use Delay (6) It rises to slow! I want to use Delay (5.5) But then it doesn't rise at all! Is there anyway to use a delay with decimals?


No, there are no decimals. The delay is measured in tics which is the minimal unit available in Doom. You have to play with the speed value of the raise floor special to get the speed you want.

Share this post


Link to post
cyber-menace said:

I've already gone ahead and done this! There is one problem though! I have other sectors with different heights in the rising lava so I need to calculate the amount of time it takes for the lava to rise EXACTLY that high. It's quite hard.


The floor rises at the rate of 1 unit/tic, which is 35 units/sec. But this is only true when the speed of the rising floor is 8. If you use a speed of 16, then it's 70 units/sec. It's recommended you make the floor rise at one of these speeds, as it makes calculation easier.

Example: If you use a speed of 8, and there's 128 units between 2 sectors, then the delay between the 2 sectors starting to rise should be 128. If you use a speed of 16 with the same 2 sectors, the delay is 64.

Share this post


Link to post

it doesn't have to be complex with multiple sectors, there are quite a few acs functions that will delay scripts until a sector finishes moving and ones that will delay the script until it reaches a certain height. much easier than figuring out all that delay stuff (which can also still be broken usually)

Share this post


Link to post

Ok I'll give that a try! I always used my delay in seconds! Here's an example:

Delay (1*35);

I'll come back tomorrow with my results! O yeah I just thought of something! If it's a speed of 4 it's 12.5/sec but that won't work it's a decimal.... that speed might be a bit fast for the player. That only gives them about 2 seconds to get out of there! That might not be good. I've been using 2 as my rising speed... it takes long enough for the player to escape... hmm... any suggestions?

Share this post


Link to post
cyber-menace said:

Ok I'll give that a try! I always used my delay in seconds! Here's an example:

Delay (1*35);

I'll come back tomorrow with my results! O yeah I just thought of something! If it's a speed of 4 it's [/b]17.5/sec[b] but that won't work it's a decimal.... that speed might be a bit fast for the player. That only gives them about 2 seconds to get out of there! That might not be good. I've been using 2 as my rising speed... it takes long enough for the player to escape... hmm... any suggestions?


If you're using a speed of 2 (very slow IMO) the delay needed to rise 128 units is this:

delay(512);

Just times the height difference between each pair of sectors by 4, and you have the right delay for each rise. (if you decide to use a speed of 4, then times them by 2 instead)

Share this post


Link to post

Hey you're quite smart eh? I made a bit of a mistake on my part... Anyways I'll try out you're idea when I get home. When I used the:

Delay (1*35)

The *35 part to it made the delay operate in seconds so that is why my delay didn't work correctly. Thank you for you're help I hope it works. Maybe now I can finish the Magma Pits and finally move on to the Abyss part of my level... I'll reveal the idea I have for the end part of the Abyss! I intend to make a MEGA Cyberdemon! He will 6 times as large and as strong as a regular Cyberdemon. This will finish my cyberdemon family. I will have mini, regular, and MEGA! I hope I finish my level sometime in the next week or so...

Share this post


Link to post

heh, if you want to delay a script until a certain sector stops moving just use tagwait(##) where ## is the sector tag. much easier than figuring out delay() calcs :P

Share this post


Link to post

Or you can use scriptwait to delay for the end of a script that you have called from within another script, very useful that one.

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
×