need help (please help)

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

Locked
User avatar
Neto
Posts: 8
Joined: Tue Jul 26, 2011 1:56

need help (please help)

Post 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. :|
User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Re: need help (please help)

Post by Gez »

You need to use [wiki]Sector_SetPlaneReflection[/wiki].
User avatar
Neto
Posts: 8
Joined: Tue Jul 26, 2011 1:56

Re: need help (please help)

Post 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?
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Re: need help (please help)

Post 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);
}
User avatar
Neto
Posts: 8
Joined: Tue Jul 26, 2011 1:56

Re: need help (please help)

Post by Neto »

when i type it as a script like Sector_SetPlaneReflection doesn't turn to blue text
User avatar
Rex Claussen
Developer
Developer
Posts: 2659
Joined: Tue Jul 11, 2006 18:36
Contact:

Re: need help (please help)

Post 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.
User avatar
NeoHippo
Posts: 408
Joined: Tue Sep 13, 2005 0:47
Location: British Columbia Canada

Re: need help (please help)

Post 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 );
}
User avatar
Neto
Posts: 8
Joined: Tue Jul 26, 2011 1:56

Re: need help (please help)

Post 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 :|
User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Re: need help (please help)

Post by Gez »

Enjay wrote:You need to use an ACS script.
It doesn't work on a line?
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Re: need help (please help)

Post 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.
User avatar
Neto
Posts: 8
Joined: Tue Jul 26, 2011 1:56

Re: need help (please help)

Post 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
User avatar
NeoHippo
Posts: 408
Joined: Tue Sep 13, 2005 0:47
Location: British Columbia Canada

Re: need help (please help)

Post 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
Image

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

start the game
Image

and cross the linedef
Image

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.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Re: need help (please help)

Post 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.)
User avatar
Neto
Posts: 8
Joined: Tue Jul 26, 2011 1:56

Re: need help (please help)

Post by Neto »

k thanks every one :D
Locked

Return to “GZDoom”