Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → I need a cog...
I need a cog...
2001-06-25, 10:36 AM #1
ok... I need a few...
1. I need a modification to the ambiant cog at massassi "scream" cog. it plays the wav repeatedly, but I needed it random. The random ambiant cog that comes with JK plays it through out the level, and I need it only in certain areas.

2. I have an elevator in my level, and I wanted when the elevator is at the bottom, a light comes on outside (texture 00tup.mat), and when it is at the top, the light comes on up there... maybe it could be made to where the surface changes to a second cell when the elevator enters a certain sector
there is also a sector between the two sectors where the elevator stops.
[http://www.massassi.net/ec/images/1604.jpg]
||||||||||||||||||||
2001-06-25, 10:45 AM #2
I have this cog to take care of it, but it don't work...

# Jedi Knight Cog Script
#
# 00_elev_switch4.cog
#
# This elevator will go up to frame one, sleep, then come back down to frame 0 when
# entered from the bottom. When entered from the top, it should stay at the bottom.
# The button surface is a call switch you can put at the top to call the thing up there.
# Elevator will react to "blocked" message.
#
# 6/24/01 by Aglar and Uber(HOV)
# This is not endorsed by LucasArts Co.
# ========================================================================================

symbols

message crossed
message activate
message arrived
message timer
message entered
message startup

surface lower_adjoin0 linkid=1
surface lower_adjoin1 linkid=1
surface lower_adjoin2 linkid=1
surface button linkid=1
surface toplight
surface bottomlight

sector top linkid=3
sector bottom linkid=4
sector middle linkid=5

thing elevator linkid=2

flex start_wait=0.25 desc=pause_before_moving_up
flex sleeptime=2.0
flex speed=4.0
sound wav0=Activate02.wav

end

# =========
code
startup:
SetWallCel(button, 0);
SetWallCel(toplight, 0);
SetWallCel(bottomlight, 0);
return;

# .........
crossed: // If player crosses adjoin(s)
Sleep(start_wait); // pause before moving up
// fall through

# .........

activate: // If player presses button
if (GetSenderId() != 1) return; // message came from elevator
if (GetWallCel(button) == 1) return;

SetWallCel(button, 1);
PlaySoundPos(wav0, SurfaceCenter(button), 0.6, -1, -1, 0);

MoveToFrame(elevator, 0, speed);
return;

# .........

arrived:
if(GetCurFrame(elevator) == 0)
{
SetWallCel(button, 0);
PlaySoundPos(wav0, SurfaceCenter(button), 0.6, -1, -1, 0);
}
else
if(GetCurFrame(elevator) == 1)
{
// Set sleep time at top
SetTimer(sleeptime);
}
return;

# .........

timer:
// Send elevator down
MoveToFrame(elevator, 1, speed);
return;

# .........

entered:
//Message from top sector
if(GetSenderId() == 3)
{
SetWallCel(toplight, 1);
SetWallCel(bottomlight, 0);
}
else
//Message from bottom sector
if(GetSenderId() == 4)
{
SetWallCel(toplight, 0);
SetWallCel(bottomlight, 1);
}
else
//Message from middle sector
if(GetSenderId() == 5)
{
SetWallCel(toplight, 0);
SetWallCel(bottomlight, 0);
}
return;
end
||||||||||||||||||||
2001-06-25, 7:52 PM #3
I can help, just not rigth now
2001-06-27, 11:08 PM #4
Anyone else know what's wrong?
||||||||||||||||||||

↑ Up to the top!