[Fixed] Scroll_Floor() does not behave as documented

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
User avatar
Hirogen2
Posts: 2033
Joined: Sat Jul 19, 2003 6:15 am
Operating System Version (Optional): Tumbleweed x64
Graphics Processor: Intel with Vulkan/Metal Support
Location: Central Germany

Scroll_Floor() doesnot behave as documented

Post by Hirogen2 »

I wanted to make a slime river/fall, which both scrolls the floor and carries
objects. However, going by the Reference Documentation version 1 (I doubt v2
ahas Scroll_Floor in yet), the prototype is:

Code: Select all

223:Scroll_Floor(int tag, bitfield type, int s/c, int dx, int dy);
type: 1=Displacement, 2=Accelerative, 3=Use line for dx/dy
s/c: 1=scroll, 2=carry, 3=scroll+carry

Within ZETH, the same arguments are printed in those menus when I selected Type
223. Placing that linedef in a map did not work, the sectors did not scroll.
Placing the same into an ACS script, ACC 1.30 revealed that this took too much
arguments, it does not take 5, but only 4.

Only by experimenting, I found out, how to do it. The correct prototype seems
to be:

Code: Select all

223:Scroll_Floor(int tag, int dx, int dy, int s/c);
Please update the docs. Where has 'type' gone?
Cyb
Posts: 912
Joined: Tue Jul 15, 2003 5:12 pm

Post by Cyb »

it has always worked as documented for me, are you sure your acc up to date? also note if you use a type other than 0 or 3 the floor will only scroll if the sector on the front side of the linedef is moved (this is how it works with boom, where these specials are derived from) and placing it in the map will only work for positive x/y scrolls unless you use type 3 (which is based on the 'direction' of the front sidedef and the length of the line)).
User avatar
Hirogen2
Posts: 2033
Joined: Sat Jul 19, 2003 6:15 am
Operating System Version (Optional): Tumbleweed x64
Graphics Processor: Intel with Vulkan/Metal Support
Location: Central Germany

Post by Hirogen2 »

When the docs say 5 args, how come ACC (yes, 1.30) wants 4?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

That's what the ZDoom source code says:

// Scroll_Floor (tag, x-move, y-move, s/c)
Cyb
Posts: 912
Joined: Tue Jul 15, 2003 5:12 pm

Post by Cyb »

no the type still exists, check the function P_SpawnScrollers in p_spec.cpp, it does checks for displacement and accelerative scrollers, plus I have a displacement scroller in one of my maps (unreleased) which works perfectly fine and as intended in 47 and beyond, though the line in zspecial.acs does specify only four arguments, of course that makes sense since the type argument won't work if it's called from a script since displacement and accelerative scrollers only work during map initialization and (as I've said) are based on the movement of the sector the front sidedef faces. So using the special on a line and in a script are not the same. in a script it assumes no type (regular scroller), on the map it needs to know what type of scroller you want
User avatar
Hirogen2
Posts: 2033
Joined: Sat Jul 19, 2003 6:15 am
Operating System Version (Optional): Tumbleweed x64
Graphics Processor: Intel with Vulkan/Metal Support
Location: Central Germany

Post by Hirogen2 »

Yes, of course, I know.
It's the docs http://zdoom.sourceforge.net/reference/ ... ture_Model (or any favorite URL) which are wrong:
223:Scroll_Floor (tag, scrollbits, 0=scroll:1=carry:2=both, x-move, y-move)
User avatar
Xaser
 
 
Posts: 10774
Joined: Sun Jul 20, 2003 12:15 pm

Post by Xaser »

Hirogen2 wrote:Yes, of course, I know.
It's the docs http://zdoom.sourceforge.net/reference/ ... ture_Model (or any favorite URL) which are wrong:
223:Scroll_Floor (tag, scrollbits, 0=scroll:1=carry:2=both, x-move, y-move)
Hmm, I always have to put in those exact same 5 parameters, and they work fine. I use Deepsea, BTW.
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

Hirogen2 wrote:Yes, of course, I know.
It's the docs http://zdoom.sourceforge.net/reference/ ... ture_Model (or any favorite URL) which are wrong:
223:Scroll_Floor (tag, scrollbits, 0=scroll:1=carry:2=both, x-move, y-move)
Are you sure the docs aren't referring to the line special rather than the ACS command? Those are two different things.

EDIT: Just checked, the page you linked is referring to line specials. It is correct.
User avatar
Hirogen2
Posts: 2033
Joined: Sat Jul 19, 2003 6:15 am
Operating System Version (Optional): Tumbleweed x64
Graphics Processor: Intel with Vulkan/Metal Support
Location: Central Germany

Post by Hirogen2 »

Uhoh... well, where is the document for ACS's "Scroll_Floor" then?
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm

Post by randi »

For a line, the docs are correct. For ACS, it as Graf Zahl showed above:
Scroll_Floor (tag, x-move, y-move, s/c)
User avatar
Xaser
 
 
Posts: 10774
Joined: Sun Jul 20, 2003 12:15 pm

Post by Xaser »

Hmm... Are there any real advantages to using the acs method? I prefer to stick with lines.
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm

Post by randi »

Using ACS, you can change a floor's scrolling while the level is running. You could also do it with a displacement scroller, but ACS is probably easier.
User avatar
Xaser
 
 
Posts: 10774
Joined: Sun Jul 20, 2003 12:15 pm

Post by Xaser »

randy wrote:Using ACS, you can change a floor's scrolling while the level is running. You could also do it with a displacement scroller, but ACS is probably easier.
Cool! :) So, let me get this straight: you can have an Enter script that sets the initial scroll, and have a button or line trigger somewhere that executes a script which changes the rate of the scroll?
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

Xaser wrote:Cool! :) So, let me get this straight: you can have an Enter script that sets the initial scroll, and have a button or line trigger somewhere that executes a script which changes the rate of the scroll?
Or you could put a timer in the enter script that changes the scroll speed at a certain time into the level.

Or you could have a rotating timer than toggles the speed between 47 settings every 5 seconds.

Or you could have a script execute when a certain enemy dies that changes the scroll speed.

Or you could have an item that when picked up changes the scroll rate.

Or you could have a weapon which when picked up spawns a monster which knocks you into a teleporter which warps you do a different level in the same hub and attacks you and after you kill it, a cutscene plays and the scroller in the previous level changes speed . . .

Or... or... or........
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm

Post by randi »

An open script would be better, because that only gets executed once.

Return to “Closed Bugs [GZDoom]”