here's the COG you'd use for that


[ Follow Ups ] [ Post Followup ] [ The Massassi Temple Message Board ]

Posted by Dylan on December 02, 1998 at 21:48:49:

In Reply to: Holodeck and how to do it posted by Kenobi on December 02, 1998 at 03:17:40:

Not too long ago I was thinking the same thing, and I made a COG to do it.



# Jedi Knight COG Script
#
# vrdeck.cog
#
# There is no way I could write every flag into this
# COG! Please adapt this for your own levels if you wish!
#
# VR Environment (Star Trek Holodeck? :) )
# Changes surface(s) with a switch
# Plays "VR Environment" sound
#
# based on 00_doorswitch.cog
#
# by Dylan
#
# http://www.geocities.com/TimesSquare/Portal/9054
# dylan_555@hotmail.com
# This file is not made or supported by LucasArts Entertainment Company


symbols

surface switch0 linkid=1

surface vrSurface0
surface vrSurface1
surface vrSurface2
surface vrSurface3
surface vrSurface4
surface vrSurface5


material vrOffMat=dflt.mat
material vrOnMat=00starry.mat

int vrSkyFlag=1
int vrDirtFlag=0
int vrMetalFlag=0
int vrShallowWater=0

sector vrRunSector0
sector vrRunSector1
sector vrRunSector2
sector vrRunSector3

sound vrRunSnd=forcefieldhum01.wav
sound vrNoSnd=silence.wav local


int vrStatus=0 local
int dummy=0 local
int index=0 local

message activated

end

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

code
activated:
if (GetSenderId() == 1)
{

if (vrStatus == 0)
{
for (index=0; index<6; index=index+1)
{
SetSurfaceMat(vrSurface0[index],vrOnMat);
if (vrSkyFlag == 1) SetSurfaceFlags(vrSurface0[index],0x200);
if (vrDirtFlag == 1) SetSurfaceFlags(vrSurface0[index],0x80000);
if (vrMetalFlag == 1) SetSurfaceFlags(vrSurface0[index],0x100000);
if (vrShallowWater == 1) SetSurfaceFlags(vrSurface0[index],0x40000);
}
dummy=SetWallCel(switch0,1);

for (index=0;index<4; index=index+1)
{
dummy=SectorSound(vrRunSector0[index],vrRunSnd,2.5);
}

vrStatus=1;
return;
}

if (vrStatus == 1)
{
for (index=0; index<6; index=index+1)
{
SetSurfaceMat(vrSurface0[index],vrOffMat);
if (vrSkyFlag == 1) ClearSurfaceFlags(vrSurface0[index],0x200);
if (vrDirtFlag == 1) ClearSurfaceFlags(vrSurface0[index],0x80000);
if (vrMetalFlag == 1) ClearSurfaceFlags(vrSurface0[index],0x100000);
if (vrShallowWater == 1) ClearSurfaceFlags(vrSurface0[index],0x40000);
}
dummy=SetWallCel(switch0,0);

for (index=0;index<4; index=index+1)
{
dummy=SectorSound(vrRunSector0[index],vrNoSnd,2.5);
}

vrStatus=0;
return;
}
}
return;

end
# ========================================================================================




Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ The Massassi Temple Message Board ]