1.1.02
Moderator: Graf Zahl
- ChupaReaper
- Posts: 202
- Joined: Fri Jun 15, 2007 16:35
- Location: England
- Contact:
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
- ChupaReaper
- Posts: 202
- Joined: Fri Jun 15, 2007 16:35
- Location: England
- Contact:
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
- ChupaReaper
- Posts: 202
- Joined: Fri Jun 15, 2007 16:35
- Location: England
- Contact:
- Rex Claussen
- Developer
- Posts: 2600
- Joined: Tue Jul 11, 2006 18:36
- Contact:
Sector_SetLink - wouldn't this require an updated version of ACS? I just tried to put it into an OPEN script and got the following error message:
$.acs:38: Function sector_setlink is used but not defined.
$.acs:39: Function sector_setlink is used but not defined.
Host byte order: LITTLE endian
I'm not in a hurry to implement this special, but I'm guessing that I'll have to wait until a new ZDooM & ACS release?
$.acs:38: Function sector_setlink is used but not defined.
$.acs:39: Function sector_setlink is used but not defined.
Host byte order: LITTLE endian
I'm not in a hurry to implement this special, but I'm guessing that I'll have to wait until a new ZDooM & ACS release?
-
- Posts: 59
- Joined: Thu Sep 08, 2005 20:02
- Contact:
Use this zspecial.acs - http://mancubus.net/svn/hosted/zdoom/ac ... pecial.acs
- Rex Claussen
- Developer
- Posts: 2600
- Joined: Tue Jul 11, 2006 18:36
- Contact:
Curious. I looked in mancubus.net for a compiled version of the ZDooM SVN but didn't look for the revised ACS code. Thanks for the link; I don't get the script compiling error now.Costja wrote:Use this zspecial.acs - http://mancubus.net/svn/hosted/zdoom/ac ... pecial.acs
I'm beginning to think that Sector_SetLink is not intended for 3D sectors. I have tried various combinations of the 'Flat' and 'Type' values, linked different sectors, but to no avail. The sectors move independently when blocked. The worst part is that the real floor or real ceiling (depending on the flat & type values) of the 3D platform sectors move in addition to the platform sectors themselves.
Graf, can this special be used with 3D rising/lowering platforms? If so, it would greatly help me if you (or anyone else reading this post) could whip out a simple example using a 3-sector platform (outer sector is a border, middle sector is the main area of the platform, and inner sector is the "piston" - only the outer and middle sectors are 3D). Thanks.
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
- Rex Claussen
- Developer
- Posts: 2600
- Joined: Tue Jul 11, 2006 18:36
- Contact:
That is what I did originally, before I tried linking the in-game sectors to themselves. [Obviously linking the in-game sectors to themselves messes up the in-game floors and ceilings (as I reported above), and is not the way to go.]Graf Zahl wrote:You have to link the control sector for the 3D-floors, not the 3D-floors themselves.
What do I do if all the control sectors have the same tag number (which is how I currently have it)? Should I simply give them separate tag numbers and link the various control sectors together? This is where I'm having a problem understanding how this works - am I supposed to link the control sectors to each other, or am I supposed to link the control sector to the in-game sectors?
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
- Rex Claussen
- Developer
- Posts: 2600
- Joined: Tue Jul 11, 2006 18:36
- Contact:
Well, I've tried everything suggested here and it's just not working for my platform. At any rate, I have created an example wad, which is attached. The platform to the West (i.e., the red-bordered one) works the way intended for a platform, except if it meets an obstruction (i.e., Sector_SetLink is not used). Try ducking under the platform while it is lowering to see what happens. You can crawl out from under it to allow the platform to descend.
The platform to the East (i.e., the blue-bordered one) uses Sector_SetLink and a 'Master" sector that controls the movement. In this case the platform does not move at all. I have tried varying the argument values ('type' & 'flat') but if the platform moves it does so in funky ways.
Would you please modify the wad to demonstrate the proper way to use linked sctors, and post it back? Thanks.
The platform to the East (i.e., the blue-bordered one) uses Sector_SetLink and a 'Master" sector that controls the movement. In this case the platform does not move at all. I have tried varying the argument values ('type' & 'flat') but if the platform moves it does so in funky ways.
Would you please modify the wad to demonstrate the proper way to use linked sctors, and post it back? Thanks.
- Attachments
-
- GZ_Plat1.zip
- Sample wad with moving platforms
- (5.8 KiB) Downloaded 268 times
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
Ok, here's your script.
It doesn't do any crushing. For that you have to do a few more changes:
- Link everything to the ceiling instead of the floor
- Change the control sector so that there's enough space for the lowering ceiling
- Replace Floor_LoverByValue with something that lowers the ceiling and can do crushing
And you may want to add some tagwaits here because otherwise your lift will be stuck forever once it gets blocked.
Code: Select all
#include "zcommon.acs"
script 1 OPEN
{
Sector_SetLink (202, 131, 0, 3);
Sector_SetLink (202, 200, 0, 3);
Sector_SetLink (202, 201, 0, 3);
Sector_SetLink (202, 134, 0, 1);
}
script 11 (void)
{
FloorAndCeiling_LowerByValue (2, 8, 128);
Floor_LowerByValue (1, 8, 128);
Delay(const:35*5);
FloorAndCeiling_RaiseByValue (2, 8, 128);
Floor_RaiseByValue (1, 8, 128);
TagWait(2);
TagWait(1);
}
script 12 (void)
{
Floor_LowerByValue (202, 8, 128);
Delay(const:35*5);
Floor_RaiseByValue (202, 8, 128);
TagWait(202);
}
- Link everything to the ceiling instead of the floor
- Change the control sector so that there's enough space for the lowering ceiling
- Replace Floor_LoverByValue with something that lowers the ceiling and can do crushing
And you may want to add some tagwaits here because otherwise your lift will be stuck forever once it gets blocked.
- Rex Claussen
- Developer
- Posts: 2600
- Joined: Tue Jul 11, 2006 18:36
- Contact:
I tried the new Script 12, and the linked sectors work as one when blocked, and once I crawl out from under the platform. However, once they are lowered they do not rise again. Pressing the switch a second time simply makes them disappear into the floor.
I did add the TagWaits, as follows:
TagWait(200);
TagWait(201);
TagWait(202);
TagWait(131);
TagWait(134);
I modified the script to make it:
FloorandCeiling_LowerByValue (202, 8, 128); and
FloorandCeiling_RaiseByValue (202, 8, 128);
but that did not help. I tried it again with some of the TagWaits commented out (although I would imagine that is contrary to what needs to be done), but that didn't do anything either.
EDIT: Incidentally, 'Type' value 3 is not described in the wiki. Where is that coming from? Is it Type 1+ Type 2? That's the only way I can figure it.
I did add the TagWaits, as follows:
TagWait(200);
TagWait(201);
TagWait(202);
TagWait(131);
TagWait(134);
I modified the script to make it:
FloorandCeiling_LowerByValue (202, 8, 128); and
FloorandCeiling_RaiseByValue (202, 8, 128);
but that did not help. I tried it again with some of the TagWaits commented out (although I would imagine that is contrary to what needs to be done), but that didn't do anything either.
EDIT: Incidentally, 'Type' value 3 is not described in the wiki. Where is that coming from? Is it Type 1+ Type 2? That's the only way I can figure it.