Change wall texture
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.
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.
Change wall texture
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!
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!
You give a line an ID and a texture. Then you use:
You should look more carefully.
Code: Select all
SetLineTexture(int lineid, int line_side, int sidedef_texture, str texturename);
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
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
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
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]
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]
- Kappes Buur
-
- Posts: 4182
- Joined: Thu Jul 17, 2003 12:19 am
- Graphics Processor: nVidia (Legacy GZDoom)
- Location: British Columbia, Canada
- Contact:
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?
Here is a small testmap. Just run to and fro, and see the far wall change.
Isn't scripting great?
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
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