Spoiler: Linedef Translucency demoI have this script, which makes a linedef texture dynamically change it's translucency, depending on Player's location regarding that line.
I had a hard time trying to make it myself, however it was entirely redone by ZZYZX afterwards.
Code: Select all
script 1 ENTER
{
for (int i = 1; i <= 99; i++)
ACS_NamedExecuteWithResult("LineTransDynamic", i, 0, 0, 0);
}
script "LineTransDynamic" (int i)
{
int cx = GetActorX(i);
int cy = GetActorY(i);
int cz = GetActorZ(i);
int dst = VectorLength(GetActorZ(0)-cz, VectorLength(GetActorX(0)-cx, GetActorY(0)-cy))>>16;
int maxdst = 512; // not 256.0
int alpha = 0;
if (dst <= maxdst) alpha = 255-(dst*255/maxdst);
TranslucentLine(i, alpha, 0);
Delay(1);
restart;
}
Spoiler: So what I did was..It doesn't work. I'm trying to figure out what I did wrong. WorldendDominator pointed out to "make sure you have the activators right".
So for a moment I thought I should try something like this:
Spoiler: addition to previous codebut still..