Think I need CogKing's help :(


[ Follow Ups ] [ Post Followup ] [ Jed Messages ]

Posted by GMS_SLUG on February 18, 1998 at 15:46:26:

Me and my friend Necare have been playing with cogs again....(God save us all!) Anywayz, we can't figure out what's wrong with this seemingly simple cog... it makes sector thrust go from a high speed to a slower one....

symbols

message startup
message activate
message entered
message timer

int currentThing local
int i local

vector playerVec local
vector vec0 desc=thrust_direction

flex thrustspeed=1.0 desc=thrust_speed
flex thrustspeed1=1.0 desc=thrust_speed

surface Switch linkid=1

sector sector0
sector sector1

sound wav0
sound wav1
thing thing0
flex fadetime=4.0
end

# ========================================================================================

code
startup:
SetWallCel(switch,1);
SetTimer(0.1);
channel=PlaySoundThing(wav0, thing0, 0.01, -1, -1, 1);
return;

# ........................................................................................

activate:
if ((GetWallCel(switch) == 1) && (GetSenderId() == 1))
{
PlaySoundPos(wav1, SurfaceCenter(switch), 1.0, -1, -1, 0);
ChangeSoundVol(channel, 1.5, fadetime/2);
ChangeSoundPitch(channel, 1, fadetime/2);
SectorThrust(sector0, vec0, thrustspeed);
SectorThrust(sector1, vec0, thrustspeed);
}

else if ((GetWallCel(switch) == 0) && (GetSenderId() == 1))
{
PlaySoundPos(wav1, SurfaceCenter(switch), 1.0, -1, -1, 0);
SectorThrust(sector0, vec0, thrustspeed1);
SectorThrust(sector1, vec0, thrustspeed1);
ChangeSoundVol(channel, 0.1, fadetime);
ChangeSoundPitch(channel, 0.1, fadetime);
}
return;

# ........................................................................................

timer:
SetWallCel(switch, 0);
ChangeSoundPitch(channel, 0.1, 0.1);
return;

# ........................................................................................

entered:
if (GetSenderId() !=0) return;
if (GetWallCel(switch) !=1) return;
currentThing = GetSourceRef();
// fall through

end

What ends up happening is that it thrusts, but even setting the speed as high as 20 we still travel downward pretty quickly.. (5 or 6 damage points) (we have the correct vector to go up, it just won't work) The switches also don't seem to have any effect... they don't change in appearance and we can't see any difference in the thrust speed... the last test was 20 as the starting speed and 2 as the second speed.... no difference...


Follow Ups:



Post a Followup

Name:
E-Mail:
Subject:
Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ Jed Messages ]