Making lines transparent in a script?
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.
Make a line type 121, give it an id and use...
TranslucentLine(lineid,value);
lineid Line ID of lines to make translucent (0 for this line)
amount How translucent the line should be [0..255].
From the old manual...
Sets the amount of translucency for all matching lines (including itself). If lineid is 0, it only sets the translucency of the line it is on. Like Line_SetIdentification, this special sets the line's id. Amount controls how opaque the line is. 0 is nearly invisible. 255 is opaque. Intermediate values are somewhere in between.
TranslucentLine(lineid,value);
lineid Line ID of lines to make translucent (0 for this line)
amount How translucent the line should be [0..255].
From the old manual...
Sets the amount of translucency for all matching lines (including itself). If lineid is 0, it only sets the translucency of the line it is on. Like Line_SetIdentification, this special sets the line's id. Amount controls how opaque the line is. 0 is nearly invisible. 255 is opaque. Intermediate values are somewhere in between.
Nope, that's how you do it in a script.DD_133 wrote:I think you missed the last couple words. IN A SCRIPT.
Use this in a script
TranslucentLine(lineid,value);
The lineid is set in the editor, but the above command is used in a script.
eg...
Code: Select all
script 1 OPEN
{
setlinespecial(2, 80, 2, 0, 0, 0, 0);
TranslucentLine(2,128);
}
I think you need to learn to script.DD_133 wrote:I think you missed the last couple words. IN A SCRIPT.

Line type 121 simply sets a line's ID. You would then use the command Enjay mentioned to make the line(s) with that id transparent whenever you like. You can even use multiple commands to cause their transparency to fluctuate, or turn them solid again.
Happy?
[EDIT]BAH!!!!![/EDIT]
Works for me 
Try the attached.
The script is just...
[edit]attachment removed[/edit]

Try the attached.
The script is just...
Code: Select all
#include "zcommon.acs"
script 1 (void)
{
print (s: "Script.");
TranslucentLine(1,128);
}
Last edited by Enjay on Mon Apr 04, 2005 7:52 pm, edited 1 time in total.
- Wasted Youth
- Posts: 358
- Joined: Mon Jan 05, 2004 9:59 pm
- Location: Earth
You could create a Window Fog or Ice Effect.
Say you had an Snow/Ice map and an indoor area windows have Ice on them. You have to restore power and that will turn the heat on so the ice on the windows will melt.
You could also Reverse this effect as well. Here is an example wad I made:
Say you had an Snow/Ice map and an indoor area windows have Ice on them. You have to restore power and that will turn the heat on so the ice on the windows will melt.
Code: Select all
Script 1 (void)
{
TranslucentLine(1,215);
Delay(5);
TranslucentLine(1,210);
Delay(5);
TranslucentLine(1,205);
Delay(5);
TranslucentLine(1,200);
Delay(5);
TranslucentLine(1,195);
Delay(5);
TranslucentLine(1,190);
Delay(5);
TranslucentLine(1,185);
Delay(5);
TranslucentLine(1,180);
Delay(5);
TranslucentLine(1,175);
Delay(5);
TranslucentLine(1,170);
Delay(5);
TranslucentLine(1,165);
Delay(5);
TranslucentLine(1,160);
Delay(5);
TranslucentLine(1,155);
Delay(5);
TranslucentLine(1,150);
Delay(5);
TranslucentLine(1,145);
Delay(5);
TranslucentLine(1,140);
Delay(5);
TranslucentLine(1,135);
Delay(5);
TranslucentLine(1,130);
Delay(5);
TranslucentLine(1,125);
Delay(5);
TranslucentLine(1,120);
Delay(5);
TranslucentLine(1,115);
Delay(5);
TranslucentLine(1,110);
Delay(5);
TranslucentLine(1,105);
Delay(5);
TranslucentLine(1,100);
Delay(5);
TranslucentLine(1,95);
Delay(5);
TranslucentLine(1,90);
Delay(5);
TranslucentLine(1,85);
}
- Macil
- Posts: 2529
- Joined: Mon Mar 22, 2004 7:00 pm
- Preferred Pronouns: He/Him
- Location: California, USA. Previously known as "Agent ME".
- Contact:
Umm.... Hate to tell you this, but you wasted a whole lot of time.
Use a For loop. you see your giant script 1? see my 99% shorter one? They both do the same thing.
Use a For loop. you see your giant script 1? see my 99% shorter one? They both do the same thing.
Code: Select all
script 1 (void)
{
For(int i=215;i>85;i=i-5)
{
TranslucentLine(1,i);
Delay(5);
}
}
- Bio Hazard
- Posts: 4019
- Joined: Fri Aug 15, 2003 8:15 pm
- Location: ferret ~/C/ZDL $
- Contact:
oh dear lord! why so much code? you could do all that in this:
and you could even make it reuseable like this:
for that one, just run ACS_EXECUTE(1,0,*LINE*,*SPEED*); whenever you needed this effect
EDIT: not fast enough... :\
at least mine was dynamic too
Code: Select all
script 1 (void){
for(int i=215;i>=85;i-=5){
TranslucentLine(1,i);
Delay(5);
}
}
Code: Select all
script 1 (int line,int time){
for(int i=215;i>=85;i-=5){
TranslucentLine(line,i);
Delay(time);
}
}
EDIT: not fast enough... :\
at least mine was dynamic too

- Wasted Youth
- Posts: 358
- Joined: Mon Jan 05, 2004 9:59 pm
- Location: Earth