Zscript:
Code: Select all
class fm_PostProcessor : LevelPostProcessor
{
// add sector tags by flat name
protected void Apply(Name checksum, String mapname)
{
Array<string> fluids = {
"NUKAGE1",
"NUKAGE2",
"NUKAGE3",
"FWATER1",
"FWATER2",
"FWATER3",
"FWATER4"
};
int start = Cvar.FindCVar("fm_start").GetInt();
int FLOOR = 0;
TexMan texture;
for (int i = 0; i < Level.Sectors.Size(); i++)
{
textureid floorid = Level.Sectors[i].GetTexture(FLOOR);
if (fluids.Find(texture.GetName(floorid)) != fluids.Size())
{
AddSectorTag(i, start);
start++;
}
}
Cvar.FindCVar("fm_end").SetInt(start);
}
}
ACS:
Code: Select all
script "fluidmotion" ENTER
{
// cvars
int fm_start = GetCVar("fm_start");
int fm_end = GetCVar("fm_end");
for (int tag = fm_start; tag < fm_end; tag++)
{
if (Random(0,1) == 0)
{
SoundSequenceOnSector(tag, "FluidMotion0", SECSEQ_INTERIOR);
}
else
{
SoundSequenceOnSector(tag, "FluidMotion1", SECSEQ_INTERIOR);
}
Floor_Waggle(tag, Random(16,64), Random(4,16), 0, 0);
}
}
SNDSEQ:
Code: Select all
:FluidMotion0
volumerand 0 30
playuntildone fm_splash
delayrand 17 47
playuntildone fm_pour
delayrand 17 47
restart
end
:FluidMotion1
volumerand 0 30
playuntildone fm_pour
delayrand 17 47
playuntildone fm_splash
delayrand 17 47
restart
end
Update 1/2/22
Spoiler: