I've got this airlock in my level, that has all the appropriate things set in the slots, but it's supposed to flood after the doors close behind you, then the doors in front of you open after the flood, only mine won't flood! I have the 3do that's textured like water that's supposed to move up, only it just sits there and never floods. Here's the cog:
And here is what it looks like:
CAn you help me?
Code:
# Jedi Knight Cog Script
# airlockdoors.cog
#
# A set of airlock doors
#
# -Obsidian 1-28-00
symbols
thing DryDoor1 linkid=1
thing DryDoor2. linkid=1
thing WetDoor1 linkid=2
thing WetDoor2 linkid=2
surface DrySwitch linkid=1
surface WetSwitch linkid=2
surface CenterSwitch linkid=3
flex DoorSpeed nolink
thing water3do linkid=4
flex FloodSpeed nolink
# sound FloodingSound nolink
sector FloodSector
vector FloodTint nolink
int running local
int flooded=0 local
int open=1 local
int close=0 local
int DryDoors=1 local
int WetDoors=2 local
int LastMoveDoor local
int channel local
vector oldtint local
message startup
message activated
message arrived
message timer
end
# ==========
code
Startup:
SetThingFlags(water3do, 0x10);
OldTint = GetSectorTint(FloodSector);
SetTimerEx(0, 1, open, drydoors);
return;
# ..........
Activated:
If(GetSenderType() != 6) return;
If(IsThingMoving(water3do)) return;
If(GetSenderID() == 1)
{
running = 1;
If(GetCurFrame(DryDoor1) != open) SetTimerEx(0, 1, close, wetdoors);
}
If(GetSenderID() == 2)
{
running = 1;
If(GetCurFrame(wetDoor1) != open) SetTimerEx(0, 1, close, drydoors);
}
If(GetSenderID() == 3)
{
running = 1;
If(GetCurFrame(DryDoor1) != Close) SetTimerEx(0, 1, close, drydoors);
If(GetCurFrame(wetDoor1) != Close) SetTimerEx(0, 1, close, wetdoors);
}
return;
# ..........
Arrived:
running = 0;
If((GetSenderRef() == DryDoor1) && (GetCurFrame(DryDoor1) == close)) Call FloodSector;
If((GetSenderRef() == WetDoor1) && (GetCurFrame(WetDoor1) == close)) Call UnFloodSector;
If(GetSenderRef() == water3do)
{
If(GetCurFrame(water3do) == 1)
{
If(flooded)
{
SetSectorTint(FloodSector, FloodTint);
SetSectorFlags(FloodSector, 0x2);
MoveToFrame(water3do, 2, floodspeed);
}
else
{
SetSectorTint(FloodSector, oldtint);
ClearSectorFlags(FloodSector, 0x2);
MoveToFrame(water3do, 0, floodspeed);
}
}
If(GetCurFrame(water3do) == 0)
{
SetTimerEx(0, 1, open, drydoors);
SetThingFlags(water3do, 0x10);
}
If(GetCurFrame(water3do) == 2)
{
SetTimerEx(0, 1, open, wetdoors);
SetThingFlags(water3do, 0x10);
}
}
return;
# ..........
Timer:
If(GetSenderID() != 1) return;
If(GetParam(1) == DryDoors)
{
MoveToFrame(DryDoor1, GetParam(0), doorspeed);
MoveToFrame(DryDoor2, GetParam(0), doorspeed);
}
If(GetParam(1) == WetDoors)
{
MoveToFrame(WetDoor1, GetParam(0), doorspeed);
MoveToFrame(WetDoor2, GetParam(0), doorspeed);
}
return;
# ..........
FloodSector:
MoveToFrame(water3do, 1, floodspeed);
ClearThingFlags(water3do, 0x10);
//channel = PlaySoundThing(FloodingSound, water3do, 1, -1, -1, 0x81);
//StopSound(channel, 3);
flooded = 1;
return;
# ..........
UnFloodSector:
MoveToFrame(water3do, 1, floodspeed);
ClearThingFlags(water3do, 0x10);
//channel = PlaySoundThing(FloodingSound, water3do, 1, -1, -1, 0x81);
//StopSound(channel, 3);
flooded = 0;
return;
endAnd here is what it looks like:
CAn you help me?
DO NOT WANT.