SetLineTexture not working

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
TheShadsy
Posts: 86
Joined: Sun Apr 15, 2012 2:58 pm

SetLineTexture not working

Post by TheShadsy »

So I'm trying to replace the front, middle texture on linedef 355 using a map script. This is on a Doom map in UDMF format. SetLineTexture is just... not working for this. I have no clue what I'm doing wrong.

Here's the script...

Code: Select all

SetLineTexture (355, LINE_FRONT, TEXTURE_MIDDLE, "HAZARD");
Nothing occurs when this runs, but the rest of the event goes off fine. Linedef 355 is additive and has partial alpha transparency, but I dunno if that's doing anything. I suspect it might be related to the lineid, but I really have no clue.

I can provide more info if needed, but I'm not sure what else would matter. Help! D:
Blue Shadow
Posts: 5046
Joined: Sun Nov 14, 2010 12:59 am

Re: SetLineTexture not working

Post by Blue Shadow »

Make sure that [wiki]SetLineTexture[/wiki] references the right lineid, i.e, the linedef should have a lineid (tag) of 355 as well.
TheShadsy
Posts: 86
Joined: Sun Apr 15, 2012 2:58 pm

Re: SetLineTexture not working

Post by TheShadsy »

Oh, lineid means the tag and not the linedef index directly. WOW I'm dumb. Thanks. :oops:
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: SetLineTexture not working

Post by Gez »

Referring to map objects directly with their number would be a terrible hassle when you modify geometry and everything gets renumbered. ;)

The other advantage of using an identification value independent on the object's index is that this way, several objects can share the same id. You can give the same lineid to several lines and change them all at once.
Locked

Return to “Editing (Archive)”