[Fixed] Scroll_Floor() does not behave as documented

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Scroll_Floor() doesnot behave as documented

Postby Hirogen2 » Sun Sep 21, 2003 1:02 pm

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 allExpand view
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 allExpand view
223:Scroll_Floor(int tag, int dx, int dy, int s/c);


Please update the docs. Where has 'type' gone?
User avatar
Hirogen2
 
Joined: 19 Jul 2003
Location: Central Germany
Github ID: jengelh
Operating System: RedHat-like Linux (RHEL, Fedora, CentOS, etc) 64-bit
Graphics Processor: Intel (Modern GZDoom)

Postby Cyb » Sun Sep 21, 2003 1:40 pm

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)).
Cyb
 
Joined: 15 Jul 2003

Postby Hirogen2 » Sun Sep 21, 2003 2:04 pm

When the docs say 5 args, how come ACC (yes, 1.30) wants 4?
User avatar
Hirogen2
 
Joined: 19 Jul 2003
Location: Central Germany
Github ID: jengelh
Operating System: RedHat-like Linux (RHEL, Fedora, CentOS, etc) 64-bit
Graphics Processor: Intel (Modern GZDoom)

Postby Graf Zahl » Sun Sep 21, 2003 2:21 pm

That's what the ZDoom source code says:

// Scroll_Floor (tag, x-move, y-move, s/c)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby Cyb » Sun Sep 21, 2003 2:32 pm

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
Cyb
 
Joined: 15 Jul 2003

Postby Hirogen2 » Sun Sep 21, 2003 2:36 pm

Yes, of course, I know.
It's the docs http://zdoom.sourceforge.net/reference/act_misc.html#Scroll_Texture_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
Hirogen2
 
Joined: 19 Jul 2003
Location: Central Germany
Github ID: jengelh
Operating System: RedHat-like Linux (RHEL, Fedora, CentOS, etc) 64-bit
Graphics Processor: Intel (Modern GZDoom)

Postby Xaser » Sun Sep 21, 2003 5:45 pm

Hirogen2 wrote:Yes, of course, I know.
It's the docs http://zdoom.sourceforge.net/reference/act_misc.html#Scroll_Texture_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
Xaser
anarchivist
 
 
 
Joined: 20 Jul 2003

Postby HotWax » Mon Sep 22, 2003 12:23 am

Hirogen2 wrote:Yes, of course, I know.
It's the docs http://zdoom.sourceforge.net/reference/act_misc.html#Scroll_Texture_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
HotWax
Do what you must, and pay the price later.
 
Joined: 18 Jul 2003
Location: Idaho Falls, ID

Postby Hirogen2 » Mon Sep 22, 2003 6:46 am

Uhoh... well, where is the document for ACS's "Scroll_Floor" then?
User avatar
Hirogen2
 
Joined: 19 Jul 2003
Location: Central Germany
Github ID: jengelh
Operating System: RedHat-like Linux (RHEL, Fedora, CentOS, etc) 64-bit
Graphics Processor: Intel (Modern GZDoom)

Postby randi » Thu Sep 25, 2003 4:05 pm

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
randi
Site Admin
 
Joined: 09 Jul 2003

Postby Xaser » Thu Sep 25, 2003 4:16 pm

Hmm... Are there any real advantages to using the acs method? I prefer to stick with lines.
User avatar
Xaser
anarchivist
 
 
 
Joined: 20 Jul 2003

Postby randi » Thu Sep 25, 2003 4:27 pm

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
randi
Site Admin
 
Joined: 09 Jul 2003

Postby Xaser » Thu Sep 25, 2003 4:32 pm

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
Xaser
anarchivist
 
 
 
Joined: 20 Jul 2003

Postby HotWax » Thu Sep 25, 2003 4:38 pm

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
HotWax
Do what you must, and pay the price later.
 
Joined: 18 Jul 2003
Location: Idaho Falls, ID

Postby randi » Thu Sep 25, 2003 4:54 pm

An open script would be better, because that only gets executed once.
User avatar
randi
Site Admin
 
Joined: 09 Jul 2003

Next

Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 1 guest