Scroll_Floor — scrolls a floor's texture and/or carries objects on it.
Scroll_Floor (tag, scrollbits, scrollcarry, x-move, y-move);
Scroll_Floor ( tag, // Tag of sector to scroll the floor in scrollbits, // Affects scrolling behavior scrollcarry, // Controls whether the floor scrolls or carries x-move, // Specifies horizontal scroll speed y-move // Specifies vertical scroll speed );
Scroll_Floor (tag, x-move, y-move, scrollcarry);
Scroll_Floor ( tag, // Tag of sector to scroll the floor in x-move, // Specifies horizontal scroll speed y-move, // Specifies vertical scroll speed scrollcarry // Controls whether the floor scrolls or carries );
Value | Meaning |
---|---|
1 | Displacement scroller. The floor only scrolls when the floor in front of the control line moves. Cannot be used together with the Accelerative scroller bit. |
2 | Accelerative scroller. The floor accelerates and decelerates when the floor in front of the control line moves. Connot be used together the the Displacement scroller bit. |
4 | Scroll speed is determined by the line's length and orientation. When this bit is set, any values specified for x-move and y-move parameters are ignored. Instead, x-move takes its value from the difference in the x-coordinate of the line's endpoints. Y-move is similar, except it uses the y-coordinate. |
Value | Meaning |
---|---|
0 | Just scroll the floor texture. |
1 | Just carry objects on the floor. |
2 | Scroll the floor texture and carry objects standing on the floor. |
Controls the horizontal speed and direction of the scroller. When used on a line, scrollbit 4 must not be set, or this parameter will be ignored. A value of 128 is no scroll, values less than 128 scroll west, and values greater than 128 scroll east.
When used in a script, this value is zero-based, so 0 is no scroll, a positive value scrolls west, and a negative value scrolls east.
Controls the horizontal speed and direction of the scroller. When used on a line, scrollbit 4 must not be set, or this parameter will be ignored.. A value of 128 is no scroll, values less than 128 scroll south, and values greater than 128 scroll north.
When used in a script, this value is zero-based, so 0 is no scroll, a positive value scrolls north, and a negative value scrolls south.
As noted in the synopses above, Scroll_Floor takes slightly different parameters when you place it on a line compared to when you use it in a script. On a line, the effect takes place immediately when the map is loaded. In a script, the effect does not occur until the special is executed. Also, scripts do not take a scrollbits parameter, because the only meaningful combination of bits in a script is 0. When used on a line, you also need to add 128 to the values of x-move and y-move because you cannot use negative parameters on a line. In ACS, you can pass negative values to specials, so you do not need to add 128 to the values of x-move and y-move when you use this special in a script.
If you use Scroll_Floor in a script, this special can have three possible effects on a sector:
Note that this means you can use Scroll_Floor in a script to change a floor's scrolling behavior, starting and stopping it whenever you want. This is also possible using displacement and accelerative scrollers on a line, but it is a lot easier to set it up in a script.
Place this special on a line to turn sectors with tag 1 into conveyor belts whose speed and direction are determined by the line:
Scroll_Floor (1, 4, 2, 0, 0);
Place this special on a line to scroll the floor of any sector with tag 2 west one texel every two tics:
Scroll_Floor (2, 0, 0, 144, 128);
This is the same as the previous example, except it also carries objects on the floor:
Scroll_Floor (2, 0, 2, 144, 128);
Use this special in a script to scroll the floor of any sector with tag 2 west one texel every two tics:
Scroll_Floor (2, 16, 0, 0);
This is the same as the previous example, except it also carries objects on the floor:
Scroll_Floor (2, 16, 0, 2);
Use this special in a script to stop the floor scrolling in any sector with tag 5:
Scroll_Floor (5, 0, 0, 0);
ZDoom 1.16
ZDoom 1.23 beta 8 added the ability to use this special in a script.