Frictional Games Forum

Full Version: WindexGlows misc 1337 haxxes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Haha, great, great demo. About to unlock it's secrets!

For anyone who's brave enough to finish the demo, open up;
C:\Penumbra\Penumbra Black Plague Demo\redist\maps
(where ever you have it installed, I put mine in a custom folder) and open the file "level04_messhall.HPS" Make sure it's hps, and not dae.

Now, paste delete everything in the hps file, and replay it with the text in the spoiler.
Spoiler below!

//////////////////////
/*CALLBACK FUNCTIONS*/


//////////////////////////////////
//START LEVER, BARREL, FIRE, WATER
/*Break the lid
*/
void BreakEllid01(string asEntity)
{
SetLocalVar("LidOff", 1);

SetGameEntityDescriptionOnceTrans("descellock","04_messhall","DescElLock");
}
/*Pull lever and start electric sparks
*/
void PullLever(string asName, int alType, int alState)
{
if(alState == 1)
{
if(GetLocalVar("LidOff") == 1)
CreateParticleSystem("elecsparks", "particle_spark_fire_bursts.ps", "elecsparks",1,1,1);

CreateSoundEntity("elecsparks","05_electric_failure", "elecsparks");

CreateLightFlashAtArea("elecsparks",1,1,0.9,0.8,1,0.2f,1.8f); //radius,r,g,b,a,in,ut

SetLeverCallback("lever01","", "");
SetLeverStuck("lever01", 1);

CreateTimer("elecbackon", 1, "ElecBackOn01",false);

//Start barrrel fire if present
if(GetLocalVar("barrel") == 1 && GetLocalVar("LidOff") == 1)
{
CreateTimer("elecfiredelay", 0.5f, "ElecFireDelay01",false);

RemoveEntityCollideCallback("Enter","flamablebarrel01","triggerburn");
RemoveEntityCollideCallback("Leave","flamablebarrel01","triggerburn");

SetLocalVar("barrel", 2);
}
}
}
void ElecBackOn01(string asTimer)
{
KillParticleSystem("elecsparks");

FadeOutSoundEntity("elecsparks", 2);

SetLeverCallback("lever01","Enter", "PullLever");
SetLeverStuck("lever01", 0);

DestroyTimer("elecbackon");
}
void ElecFireDelay01(string asTimer)
{
SetParticleSystemActive("flamablebarrel01_fire01", true);

PlaySoundEntity("flamablebarrel01_burning", false);

SetLight3DVisible("flamablebarrel01_light1", true);
SetLight3DFlickerActive("flamablebarrel01_light1", true);

//CreateSoundEntityAt("Entity","flamablebarrel01", "burning","interact_paraffin_burn");
}
/*Place barrel in correct location to start burning
*/
void TriggerBurn(string asParent, string asChild)
{
if(GetLocalVar("barrel") == 1)
{
SetLocalVar("barrel", 0);
return;
}

if(GetLocalVar("barrel") == 0)
{
SetLocalVar("barrel", 1);
return;
}
}
/*Place barrel under water
*/
void TriggerWater(string asParent, string asChild)
{
if(GetLocalVar("barrel") == 2 && GetLocalVar("water") == 1)
{
SetLocalVar("water", 0);

DestroyTimer("prewaterdelay");

return;
}

if(GetLocalVar("barrel") == 2 && GetLocalVar("water") == 0)
{
SetLocalVar("water", 1);

CreateTimer("prewaterdelay", 2, "PreWaterDelay01",false);

return;
}
}
void PreWaterDelay01(string asTimer)
{
for(int i=1;i<=4;i++)
{
RemoveEntityCollideCallback("Enter","flamablebarrel01","triggerwater"+i);
RemoveEntityCollideCallback("Leave","flamablebarrel01","triggerwater"+i);
}

CreateSoundEntityAt("Entity","elight01", "alarm","05_fire_alarm");

CreateTimer("waterdelay", 2, "WaterDelay01",false);
}
void WaterDelay01(string asTimer)
{
for(int i=1;i<=4;i++)
{
CreateParticleSystem("sprinkler"+i, "particle_sprinkler.ps", "sprinkler"+i,1,1,1);
CreateSoundEntityAt("Entity","sprinkler"+i, "sprinkler"+i,"05_water_sprinkler");
}

FadeInSoundEntity("splashsound", 0.5f);

for(int i=1;i<=7; ++i)
SetParticleSystemActive("drops"+i,true);

for(int i=1;i<=4;i++)
{
RemoveEntityCollideCallback("Enter","flamablebarrel01","triggerwater"+i);
RemoveEntityCollideCallback("Leave","flamablebarrel01","triggerwater"+i);
}

SetLampLit("elight01", true, true);

CreateTimer("waterdelay2", 3, "WaterDelay02",false);

CreateTimer("waterdelay4", 15, "WaterDelay04",false);

DestroyTimer("waterdelay");

CreateTimer("drops", 0.1, "DropDelay03",false);
}

void DropDelay(string asTimer)
{
for(int i=1;i<=7; ++i)
SetParticleSystemActive("drops"+i,true);
}

void WaterDelay02(string asTimer)
{
KillParticleSystem("flamablebarrel01_fire01");

CreateSoundEntityAt("Entity","flamablebarrel01", "burnout","05_fire_out");

SetLight3DFlickerActive("flamablebarrel01_light1", false);
FadeLight3D("flamablebarrel01_light1", 0,0,0,0,0,0.5f);

SetParticleSystemActive("flamablebarrel01_smoke01", true);

//FadeOutSoundEntity("burning", 2);
FadeOutSoundEntity("flamablebarrel01_burning",2);

SetGameEntityActive("emergencylink",false);

SetJointControllerActive("securitydoor01_sjoint1","closed", false);
SetJointControllerActive("securitydoor01_sjoint2","closed", false);

SetJointControllerActive("securitydoor01_sjoint1","opened", true);
SetJointControllerActive("securitydoor01_sjoint2","opened", true);

CreateTimer("waterdelay3", 3, "WaterDelay03",false);

AutoSave();
}



void WaterDelay03(string asTimer)
{
FadeOutSoundEntity("alarm", 5);
}

void WaterDelay04(string asTimer)
{
for(int i=1;i<=4;i++)
PlaySoundEntity("drip"+i, false);

for(int i=1;i<=4;i++)
{
KillParticleSystem("sprinkler"+i);
FadeOutSoundEntity("sprinkler"+i, 1);
FadeOutSoundEntity("splashsound", 1);
}

for(int i=1;i<=7; ++i)
KillParticleSystem("drops"+i);


}
//STOP LEVER, BARREL, FIRE, WATER
/////////////////////////////////


///////////////////////////////////////////////
//START BOUNCE PLAYER IN SEWER IF NO FLASHLIGHT
void EnterSewer(string asParent, string asChild)
{
if(HasItem("flashlight") != true)
{
FadeOut(0.4f);

SetPlayerActive(false);

CreateTimer("bouncedelay1", 0.5f, "BounceDelay01",false);
CreateTimer("bouncedelay2", 0.6f, "BounceDelay01",false);
}
}
void BounceDelay01(string asTimer)
{
if(asTimer == "bouncedelay1")
{
TeleportPlayerToArea("linkbounce");

StartPlayerLookAt("bouncelook",100, 100);
}

if(asTimer == "bouncedelay2")
{
FadeIn(0.5f);

SetPlayerActive(true);

StopPlayerLookAt();

AddSubTitleTrans("04_messhall", "EventForcePlayerBack", 3.5f);
}
}
//STOP BOUNCE PLAYER IN SEWER IF NO FLASHLIGHT
//////////////////////////////////////////////


/////////////////////
//START THE PROJECTOR
void InteractProjector(bool abActive)
{
if(abActive==true)
{
FadeInSoundEntity("projector1", 0.8f);

if(GetLocalVar("FirstPressProjector") == 0)
{
PlayGameMusic("Penumbra_EP1_C1.ogg", 0.7f,0.3f,false, 10);
SetLocalVar("FirstPressProjector", 1);
}

SetGameEntityActive("descprojimage", true);
}
else
{
FadeOutSoundEntity("projector1", 0.8f);

SetGameEntityActive("descprojimage", false);
}
}
//STOP THE PROJECTOR
////////////////////


/////////////////////////////
//START THE COMPUTER TERMINAL
/*Player interacts with computer to start it
*/
void InteractComputer(bool abActive)
{
return;

//DO THE COMPUTER TERMINAL CODE
if(abActive==true)
{
OpenScreenGui("04_howard_gui.gui");


//SetLocalVar("computer", 1);
}
else
{
CreateLocalVar("HowardMessage", 1); //Comment on finding Howard.

if(GetLocalVar("HowardMessage") == 0)
{
AddSubTitleTrans("04_messhall","EventFoundHoward",4.5);
SetLocalVar("HowardMessage", 2);
}

//SetLocalVar("computer", 0);
}
}
/*Player uses CD on computer to view it if computer is on
*/
void UseCDonComputer(string asItem, string asEntity)
{
return;

AddMessageTrans("04_messhall", "EventInsertCD");

PlayGuiSound("interact_insert_cd", 1);

SetLocalVar("cd_inserted",1);

RemoveItem("sheltercd1");

//TODO: Add some sound here.
}
//STOP THE COMPUTER TERMINAL
////////////////////////////


////////////////////////
//START GO TO NEXT LEVEL
void EnterNextLevel(string asParent, string asChild)
{
/*ChangeMap( "level05_sewers.dae", //New map
"link01", //Positon on new map
"player_exit_tunnel","", //Stop and end sound.
0.5f , 0.5f,//Fade out and in time (seconds).
"LoadTexts", "04_to_05",//Load text (cat and entry)
"loadscreen_sewer.jpg"); */
}
//STOP GO TO NEXT LEVEL
///////////////////////


//////////////////
//START SEWER AMB
void SewerAmbEnter(string asParent, string asChild)
{
FadeInSoundEntity("amb2",0.7f);
}
void SewerAmbLeave(string asParent, string asChild)
{
FadeOutSoundEntity("amb2",0.7f);
}
//STOP SEWER AMB
////////////////

//////////////////
//START EXAMINE PROJ SCREEN


void PlayerExaminesProjScreen(string asEntity)
{
RemoveEntityCallback("PlayerExamine",asEntity);

PlayGuiSound("gui_notebook_add_note", 0.8f);

AddSubTitleTrans("04_messhall", "EvenExamineProjScreen", 3);

AddNotebookNote("Items", "NoteTimeLine", "Notes", "timeline");
}


//STOP EXAMINE PROJ SCREEN
//////////////////


/////////////////////////
//START FINDING LAST ROOM
void PlayerFindsLastRoom (string asEntity)
{
AutoSave();

CreateTimer("lastroom1", 1, "LastRoom",false);


RemoveEntityCallback("PlayerInteract","freezerdoor01");
}




//STOP FINDING LAST ROOM
////////////////////////


//////////////////////
//START A LITTLE SCARE
void EnterKitchenScare(string asParent, string asChild)
{
PlayGuiSound("horror_whisper_messhall", 1);

CreateSoundEntity("descpapershelf","break_impact_metal", "descpapershelf");

AddBodyImpulse("fryingpan03","World",4,0.6,0.1);

StartScreenShake(0.008f, 0.7,0.2,0.5);

RemoveEntityCollideCallback("Enter","Player","kitchenscare");
}
void EnterMonsterScare(string asEntity)
{
CreateParticleSystem("deschole", "particle_vent_monster_bee.ps", "deschole",1,1,1);

CreateTimer("nextsound1", 0.25f, "NextSound",false);
CreateTimer("nextsound2", 3, "NextSound",false);

RemoveEntityCallback("PlayerInteract","storagedoor01");
}
void NextSound(string asTimer)
{
if(asTimer == "nextsound1")
{
StartScreenShake(0.008f, 1,0.4,0.6);

CreateSoundEntity("deschole","04_holemonster_amb", "deschole");
}
if(asTimer == "nextsound2")
CreateSoundEntity("deschole1","04_holemonster_crawl", "deschole1");
}
//STOP A LITTLE SCARE
///////////////////////


////////////
//START NOTE
void PickNote(string asEntity)
{
FadeLight3D("notelight", 0,0,0,0,0,1);
}
//STOP NOTE
///////////


//////////////////////////////////////////////////////////
/*This function is run the FIRST time the map is loaded */
void OnStart()
{
//---- MAP INIT ------------
SetMapGameNameTrans("SaveNames", "level04_messhall");

LinkSoundEnvToAllSectors("soundenvs/EnvPreset002_Room.snv", 0.01f);
LinkSoundEnvToSector("1", "soundenvs/EnvPreset002_Room.snv", 0.01f,10);
LinkSoundEnvToSector("2", "soundenvs/EnvPreset002_Room.snv", 0.01f,10);
LinkSoundEnvToSector("STORAGE1", "soundenvs/EnvPreset003_Bathroom.snv", 0.01f,10);
LinkSoundEnvToSector("STORAGE2", "soundenvs/EnvPreset003_Bathroom.snv", 0.01f,10);
LinkSoundEnvToSector("KITCHEN", "soundenvs/EnvPreset001_PaddedCell.snv", 0.01f,10);
LinkSoundEnvToSector("FREEZER", "soundenvs/EnvPreset002_Room.snv", 0.01f,10);
LinkSoundEnvToSector("BASEMENT", "soundenvs/EnvPreset005_StoneRoom.snv", 0.01f,10);
LinkSoundEnvToSector("SEWER", "soundenvs/EnvPreset013_StoneCorridor.snv", 0.01f,10);
LinkSoundEnvToSector("SEWER2", "soundenvs/EnvPreset013_StoneCorridor.snv", 0.01f,10);
LinkSoundEnvToSector("SEWER3", "soundenvs/EnvPreset013_StoneCorridor.snv", 0.01f,10);


// AUDIO INIT
StopSoundEntity("amb2", false);
StopSoundEntity("projector1", false);
StopSoundEntity("flamablebarrel01_burning", false);
StopSoundEntity("splashsound", false);

for(int i=1;i<=4;i++)
StopSoundEntity("drip"+i, false);


// ENTITY INIT
AddEntityCallback("OnBreak","ellid01","BreakEllid01");

AddEntityCollideCallback("Enter","Player","kitchenscare","EnterKitchenScare");

AddEntityCollideCallback("Enter","Player","exitlevel","EnterNextLevel");
AddEntityCollideCallback("Enter","Player","sewerentrance","EnterSewer");
AddEntityCollideCallback("Enter","Player","seweramb","SewerAmbEnter");
AddEntityCollideCallback("Leave","Player","seweramb","SewerAmbLeave");

SetLeverCallback("lever01","Enter", "PullLever");

AddEntityCollideCallback("Enter","flamablebarrel01","triggerburn","TriggerBurn");
AddEntityCollideCallback("Leave","flamablebarrel01","triggerburn","TriggerBurn");
for(int i=1;i<=4;i++)
{
AddEntityCollideCallback("Enter","flamablebarrel01","triggerwater"+i,"TriggerWater");
AddEntityCollideCallback("Leave","flamablebarrel01","triggerwater"+i,"TriggerWater");
}

SetGameEntityMaxInteractDist("lever01",1.6f);
SetGameEntityMaxInteractDist("ladder",3);

SetDoorLocked("storagedoor02", true);
SetDoorLockedProperties("storagedoor02",
"04_messhall","lockedDoor",
"interact_closed_door_old",
true);

SetupLinkLockedProp("emergencylink","interact_locked_metal_door","04_messhall","LockedDoorEmergency");
SetLinkLocked("emergencylink", true);

SetupLinkLockedProp("entrancedoor","interact_locked_metal_door","04_messhall","EventLockedEntrance");
SetLinkLocked("entrancedoor", true);

SetupLinkLockedProp("jammeddoor","interact_locked_metal_door","04_messhall","EventJammedDoor");
SetLinkLocked("jammeddoor", true);

SetGameEntityActive("descprojimage", false);
AddEntityCallback("PlayerExamine","descprojimage","PlayerExaminesProjScreen");

AddEntityCallback("PlayerInteract","freezerdoor01","PlayerFindsLastRoom");
AddEntityCallback("PlayerInteract","storagedoor01","EnterMonsterScare");

for(int i=1;i<=7; ++i)
{
SetParticleSystemActive("drops"+i,false);
}

//remove get off lid puzzle.
SetGameEntityActive("ellid01",false);
SetLocalVar("LidOff", 1);
SetGameEntityDescriptionOnceTrans("descellock","04_messhall","DescElLock");

// INTERACT INIT
AddUseCallback("sheltercd1", "terminal01", "UseCDonComputer");
SetLampLitChangeCallback("terminal01","InteractComputer");
SetLampLitChangeCallback("projector01", "InteractProjector");
AddPickupCallback("survivorsnote", "PickNote");


// LEVEL INIT
SetAmbientColor(0.11,0.12,0.13);
SetSkyboxActive(false);


// LIGHT INIT
SetLampLit("wlight01", false, false);
SetLampLit("projector01", false, false);
SetLampLit("florescent03", false, false);
SetLampLit("florescent04", false, false);
SetLampLit("elight01", false, false);
SetLampLit("terminal01", false, false);


SetLight3DFlicker("flamablebarrel01_light1",
0.8,0.767, 0.695, 0.7,
3, //radius
0.1, 0.6,
"","", //on sound and ps
0.1, 0.3,
"","", //off sound and ps
true, //fade
2.2, 1.8); //Fade time on/off
SetLight3DFlickerActive("flamablebarrel01_light1", false);
SetLight3DVisible("flamablebarrel01_light1", false);


//PARTICLE INIT
SetParticleSystemActive("flamablebarrel01_fire01", false);
SetParticleSystemActive("flamablebarrel01_smoke01", false);

//TEXT INIT
SetGameEntityDescriptionOnceTrans("descwindow","04_messhall","DescWindow");
SetGameEntityDescriptionOnceTrans("descsign01","04_messhall","DescSign01");
SetGameEntityDescriptionOnceTrans("descprojimage","04_messhall","DescProjImage");
SetGameEntityDescriptionOnceTrans("deschole","04_messhall","DescHole");
SetGameEntityDescriptionOnceTrans("desccavein","04_messhall","DescCavein");
SetGameEntityDescriptionOnceTrans("descbars","04_messhall","DescBars");
SetGameEntityDescriptionOnceTrans("lever01","04_messhall","Desclever01");
SetGameEntityDescriptionOnceTrans("fridge02","04_messhall","Descfridge01");
SetGameEntityDescriptionOnceTrans("terminal01","04_messhall","Descterminal01");
SetGameEntityDescriptionOnceTrans("projector01","04_messhall","Descprojector01");
SetGameEntityDescriptionOnceTrans("flamablebarrel01","04_messhall","Descflamablebarrel01");
SetGameEntityDescriptionOnceTrans("cooker01","04_messhall","DescCooker");
SetGameEntityDescriptionOnceTrans("cooker02","04_messhall","DescCooker");
SetGameEntityDescriptionOnceTrans("sink01","04_messhall","DescSink");
SetGameEntityDescriptionOnceTrans("descpapershelf","04_messhall","DescPaperShelf");
SetGameEntityDescriptionOnceTrans("sprinkler03","04_messhall","DescPaperShelf");
SetGameEntityDescriptionOnceTrans("sprinkler04","04_messhall","DescPaperShelf");
SetGameEntityDescriptionOnceTrans("sprinkler05","04_messhall","DescSprinkler");

for(int i=1;i<=3;i++)
SetGameEntityDescriptionOnceTrans("cornflakes"+i,"04_messhall","DescCornflakes");


//VARIABLES
CreateLocalVar("barrel", 0); //To check if barrel is in postition to burn.
CreateLocalVar("water", 0); //To check if barrel is in postition to start water.
SetLocalVar("computer", 0); //Check if computer is running.
CreateLocalVar("storagedoor02_locked",1); //If storage door is locked.
CreateLocalVar("cd_inserted",0); //If storage door is locked.
CreateLocalVar("LidOff", 0); //Do the sparks and light barrel if lid is off
CreateLocalVar("FirstPressProjector", 0); //Play music first time projecttor is on

SetGlobalVar("03_can_fill_syringe_with_own_blood",0);

ClearSavedMaps();

AutoSave();
}


/////////////////////////////////////////////////////
/*This function is run everytime the map is loaded */
void OnLoad()
{
PlayGameMusic("Penumbra_BP_A10", 0.7,0.1f,true, 0);
}


///////////////////////////////////////
/*This function is run 60 times a sec*/
void OnUpdate()
{
}


/////////////////////////////////////////////////////
/*This function is run everytime the map is unloaded */
void OnExit()
{
StopGameMusic(0.5,0);
}


This allows you to enter the last room, but that's it. You get a few notes, but the computer will not work correctly.
Spoiler below!



Remember the body from the vent? This is it. I don't think that's a penis either..
I find it extremly horrifying that the mods created this, and not I. Ah well.
You can enter the last room even when you don't modify the files. Just use that thrash can to open the door, and pull it fully open with it.
The only thing that ends the game, is when you click the door.
You need to make a mod to get rid of this discusting Umbilical Cord thing.
I'll see what I can do; I'm pretty sure it's related to the storyline though. I'll make a mod once the full game is released.
You can give all kinds of items too if you mess around with the .hps files.
Your probolly right. Could you mabey just edit the textures to make to gray like the rest of his body.

Penumbra Wrote:
You need to make a mod to get rid of this discusting Umbilical Cord thing.


its just the model, you can even do it yourself
just hope that you have the right .dae exporter since it changes like each week -_-

Reference URL's