
need help (please help)
Moderator: Graf Zahl
- Neto
- Posts: 8
- Joined: Tue Jul 26, 2011 1:56
need help (please help)
Hi I'm new to DRD team but not with gzdoom. I know how to do all the basic stuff but i need help. does any one know how do make floors and ceilings mirror, like how you can make a mirror on the wall on doom but how can i do it on the floor and ceiling. 

- Gez
- Developer
- Posts: 1399
- Joined: Mon Oct 22, 2007 16:47
Re: need help (please help)
You need to use [wiki]Sector_SetPlaneReflection[/wiki].
- Neto
- Posts: 8
- Joined: Tue Jul 26, 2011 1:56
Re: need help (please help)
it doesn't seem to work i tried all the ways i know but it doesn't work. could you tell me how to use the reflection thing?
- Enjay
- Developer
- Posts: 4748
- Joined: Tue Aug 30, 2005 23:19
- Location: Scotland
- Contact:
Re: need help (please help)
You need to use an ACS script.
Tag the sector that you want to be reflective with a sector tag, then use that tag in your script:
eg (where tag = the number of the tag you have given the sector)
Sector_SetPlaneReflection(tag, 128, 0);
will make the floor shiny
Sector_SetPlaneReflection(tag, 0, 128);
will make the ceiling shiny
alter the 128 to a value that suits you.
Typical script:
Tag the sector that you want to be reflective with a sector tag, then use that tag in your script:
eg (where tag = the number of the tag you have given the sector)
Sector_SetPlaneReflection(tag, 128, 0);
will make the floor shiny
Sector_SetPlaneReflection(tag, 0, 128);
will make the ceiling shiny
alter the 128 to a value that suits you.
Typical script:
Code: Select all
Script 1 OPEN
{
Sector_SetPlaneReflection(1, 160, 0);
}
- Neto
- Posts: 8
- Joined: Tue Jul 26, 2011 1:56
Re: need help (please help)
when i type it as a script like Sector_SetPlaneReflection doesn't turn to blue text
- Rex Claussen
- Developer
- Posts: 2659
- Joined: Tue Jul 11, 2006 18:36
- Contact:
Re: need help (please help)
I'm guessing you mean that your map editor seems not to recognize your script. Does it compile properly? If not, there may be an error in yor syntax. Please post the code you've used for that script. It should look like this:Neto wrote:when i type it as a script like Sector_SetPlaneReflection doesn't turn to blue text
{
Sector_SetPlaneReflection (tag, floor, ceiling);
}
Remember to use the semicolon (';') at the end of each line of code.
- NeoHippo
- Posts: 408
- Joined: Tue Sep 13, 2005 0:47
- Location: British Columbia Canada
Re: need help (please help)
You did not mention how or what you are using for scripting.Neto wrote:when i type it as a script like Sector_SetPlaneReflection doesn't turn to blue text
Did you get any errors?
What Rex wrote, exactly my thought as well.
If I may expand on that a bit. Sector_SetPlaneReflection has been included into GZDoom in 2005, so, Doombuilder2 or Slade3, even in their earliest form, should not have any difficulty in compiling this special. From time to time, updated versions of ACS appear. You might want to check out
http://zdoom.org/Download
http://svn.drdteam.org/ACC/
If you are new to scripting, please, read the corresponding articles on the WIKI
http://zdoom.org/wiki/ACS
And always type this as the very first line: #include "zcommon.acs"
so, the script, for a somewhat reflective floor, would look like this:
Code: Select all
#include "zcommon.acs"
script 200 OPEN
{
Sector_SetPlaneReflection ( 150, 100, 0 );
}
- Neto
- Posts: 8
- Joined: Tue Jul 26, 2011 1:56
Re: need help (please help)
this is how i type it in
{
Sector_SetPlaneReflection(tag, floor, ceiling);
}
i type exactly like that.
the error is :
line 6 in file "script.acs"...
script.acs:6: function Sector_SetPlaneReflection is used but not defined
the ACS compiler did not compile your script
and that's it
{
Sector_SetPlaneReflection(tag, floor, ceiling);
}
i type exactly like that.
the error is :
line 6 in file "script.acs"...
script.acs:6: function Sector_SetPlaneReflection is used but not defined
the ACS compiler did not compile your script
and that's it

- Gez
- Developer
- Posts: 1399
- Joined: Mon Oct 22, 2007 16:47
Re: need help (please help)
It doesn't work on a line?Enjay wrote:You need to use an ACS script.
- Enjay
- Developer
- Posts: 4748
- Joined: Tue Aug 30, 2005 23:19
- Location: Scotland
- Contact:
Re: need help (please help)
I couldn't remember if it worked on a line or not but I just checked and, yes, it works on a line.
So Neto, you could give a line type 159, tag it to the appropriate sector, set the args for the level of shinyness that you want (using the same rules as for the script version - floor first then ceiling) and just make sure that the line is activated before the player sees the sector in question.
So Neto, you could give a line type 159, tag it to the appropriate sector, set the args for the level of shinyness that you want (using the same rules as for the script version - floor first then ceiling) and just make sure that the line is activated before the player sees the sector in question.
- Neto
- Posts: 8
- Joined: Tue Jul 26, 2011 1:56
Re: need help (please help)
how would i make a line activated before the player sees itEnjay wrote:and just make sure that the line is activated before the player sees the sector in question.
- NeoHippo
- Posts: 408
- Joined: Tue Sep 13, 2005 0:47
- Location: British Columbia Canada
Re: need help (please help)
It doesn't matter if the player sees the sector, which is to be reflective, or not. The important thing is that the linedef must be triggered at some point.
If you have a map such as this one

simply setup a linedef with the sectorID and the special and a type of trigger

start the game

and cross the linedef

and there you have a reflective floor.
The drawback with this is that the linedef has be triggered somehow before the reflection becomes visible. Although this could be worked into a map as a sort of bread crumbs. Areas already visited become reflective.
With an OPEN script, floors and/or ceilings are reflective right from the start.
If you have a map such as this one

simply setup a linedef with the sectorID and the special and a type of trigger

start the game

and cross the linedef

and there you have a reflective floor.
The drawback with this is that the linedef has be triggered somehow before the reflection becomes visible. Although this could be worked into a map as a sort of bread crumbs. Areas already visited become reflective.
With an OPEN script, floors and/or ceilings are reflective right from the start.
- Enjay
- Developer
- Posts: 4748
- Joined: Tue Aug 30, 2005 23:19
- Location: Scotland
- Contact:
Re: need help (please help)
I only meant just make sure that the player walks over the line to activate the shiny floor before the player can see the floor in question to prevent him seeing it changing from normal to shiny. (NeoHippo already covered that, I was just confirming that's what I meant.)Neto wrote:how would i make a line activated before the player sees it