Page 1 of 1
need help (please help)
Posted: Tue Jul 26, 2011 2:14
by Neto
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.

Re: need help (please help)
Posted: Tue Jul 26, 2011 13:54
by Gez
You need to use [wiki]Sector_SetPlaneReflection[/wiki].
Re: need help (please help)
Posted: Tue Jul 26, 2011 22:45
by Neto
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?
Re: need help (please help)
Posted: Wed Jul 27, 2011 0:05
by Enjay
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:
Code: Select all
Script 1 OPEN
{
Sector_SetPlaneReflection(1, 160, 0);
}
Re: need help (please help)
Posted: Fri Jul 29, 2011 3:51
by Neto
when i type it as a script like Sector_SetPlaneReflection doesn't turn to blue text
Re: need help (please help)
Posted: Fri Jul 29, 2011 13:02
by Rex Claussen
Neto wrote:when i type it as a script like Sector_SetPlaneReflection doesn't turn to blue text
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:
{
Sector_SetPlaneReflection (tag, floor, ceiling);
}
Remember to use the semicolon (';') at the end of each line of code.
Re: need help (please help)
Posted: Fri Jul 29, 2011 18:27
by NeoHippo
Neto wrote:when i type it as a script like Sector_SetPlaneReflection doesn't turn to blue text
You did not mention how or what you are using for scripting.
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 );
}
Re: need help (please help)
Posted: Fri Jul 29, 2011 22:35
by Neto
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

Re: need help (please help)
Posted: Fri Jul 29, 2011 23:14
by Gez
Enjay wrote:You need to use an ACS script.
It doesn't work on a line?
Re: need help (please help)
Posted: Fri Jul 29, 2011 23:58
by Enjay
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.
Re: need help (please help)
Posted: Sat Jul 30, 2011 2:36
by Neto
Enjay wrote:and just make sure that the line is activated before the player sees the sector in question.
how would i make a line activated before the player sees it
Re: need help (please help)
Posted: Sat Jul 30, 2011 4:29
by NeoHippo
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.
Re: need help (please help)
Posted: Sat Jul 30, 2011 9:42
by Enjay
Neto wrote:how would i make a line activated before the player sees it
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.)
Re: need help (please help)
Posted: Mon Aug 01, 2011 10:45
by Neto
k thanks every one
