Change wall texture

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
betanol
Posts: 18
Joined: Tue Aug 10, 2004 11:19 am

Change wall texture

Post by betanol »

This is the situation, i made a button that make a bunch of things, such as reduce lights, open a door, and etc.

I need to change a wall texture, but I dont know the command. Im familiar with the comands of change floor and ceiling textures but not wall..

I looked up Zdoom wiki for comands and I dit not found any relating to wall texture..

help!
User avatar
Wills
Posts: 1446
Joined: Mon Jan 10, 2005 7:01 pm
Location: The Well of Wishes

Post by Wills »

You give a line an ID and a texture. Then you use:

Code: Select all

SetLineTexture(int lineid, int line_side, int sidedef_texture, str texturename);
You should look more carefully.
User avatar
Setzer
Posts: 124
Joined: Mon Mar 13, 2006 11:12 pm
Location: nowhereville

Post by Setzer »

A common problem with searching, I think, is you might be trying to look for something too specific. For example, the phrase 'wall texture' is very rarely used, and if you input that as your search field, it might not have shown up too well.

Just a friendly pointer. ;)
User avatar
Wills
Posts: 1446
Joined: Mon Jan 10, 2005 7:01 pm
Location: The Well of Wishes

Post by Wills »

I do think the Wiki search engine requires you to be very broad. Can that be changed?
betanol
Posts: 18
Joined: Tue Aug 10, 2004 11:19 am

Post by betanol »

Hmm I'm really sorry, I didn't thought about Linetexture or something similar.. There is another problem.. I did not get this lineid thing well..

I know im supposed to use line_setidentification, but I don't know how this command works, expecially with the moreflags thing.. Im really confused.. So i think the thing is the following: You set H Line identification on the line that i want to change, and then put lineid to 1. after that i put Setlinetexture(1,SIDE_FRONT,"dont know what is that","texturename");
???

im reeeeally confused about this one
asdf
Posts: 193
Joined: Mon Jun 19, 2006 1:50 pm

Post by asdf »

the thing that you don't know what is

Code: Select all

TEXTURE_TOP - upper texture of sidedef
TEXTURE_MIDDLE - middle texture of sidedef
TEXTURE_BOTTOM - lower texture of sidedef
User avatar
Enjay
 
 
Posts: 27099
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Post by Enjay »

To set line id, make the line a type 121 and set the line id number as an argument using your editor.

Setlinetexture(1,SIDE_FRONT,"dont know what is that","texturename");

1 would be the id you gave your line. It could be any number up to 255 - depending on how you set it.

SIDE_FRONT - I hope that one is obvious. The other option is SIDE_BACK.

"dont know what is that" - sidedef_texture can be "TEXTURE_MIDDLE", TEXTURE_TOP or TEXTURE_BOTTOM for middle, upper or lower side def.

"texturename" - is the name of the texture you want to appear on the line - BRONZE1, TEKGREN2, whatever. Setting it to "-" removes the texture.

[edit]Gosh darn it, beaten to it![/edit]
betanol
Posts: 18
Joined: Tue Aug 10, 2004 11:19 am

Post by betanol »

the texture I want to modify happens to be a wall.. so, what the command would be like? (Again i did not get that "SIDE_FRONT... TEXTURE_MIDDLE" thing. Deeply sorry.)
User avatar
Kappes Buur
 
 
Posts: 4182
Joined: Thu Jul 17, 2003 12:19 am
Graphics Processor: nVidia (Legacy GZDoom)
Location: British Columbia, Canada
Contact:

Post by Kappes Buur »

You're in luck, I had a few minutes to spare and I wanted to refresh my memory as well.

Here is a small testmap. Just run to and fro, and see the far wall change.
Isn't scripting great?
User avatar
Enjay
 
 
Posts: 27099
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Post by Enjay »

The things you are confused about are the same things you have essentially been dealing with in an editor when doing normal editing.

Side_front = the front side or side 1 of a line. Side_back is the back or side 2. A single sided wall (like the ones that normally bound a room) only have side_front. A 2 sided wall has a front and a back. You specify whether you want the front or the back to change using side_front or side_back. For a single sided line, you should only use side_front.

TEXTURE_MIDDLE, TEXTURE_TOP and TEXTURE_BOTTOM are the parts of a line you normally put a texture on. Texture_middle is the normal mid texture of a wall. This is the only one you can see on a 1 sided line. Texture_top is the one that gets exposed when 2 adjacent sectors have different ceiling heights. Texture_bottom is the one that gets exposed when 2 adjacent sectors have different floor heights (eg the face of a step).

Oh, and you might like to try my testmap too
betanol
Posts: 18
Joined: Tue Aug 10, 2004 11:19 am

Post by betanol »

Thanks to everybody who helped, those wads you guys sent me was realy helpful and I learned a lot!

I fixed my script and now runs great!

thanks once again! :wink:
Locked

Return to “Editing (Archive)”