Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 6 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script causing game to randomly crash (No FATAL ERROR)
RawkBandMan Offline
Posting Freak

Posts: 1,146
Threads: 35
Joined: Nov 2010
Reputation: 5
#73
RE: extra_english now is working, but I need help with a different script :)

I added a different Wake Up Function, cuz the one I had isn't what I wanted. But after I put the new one in, it gives me this error

main(157,1): ERR : Unexpected End of File

hps
Spoiler below!

void OnStart()
{
AddUseItemCallback("", "key_torture_chamber_1", "prison_section_1", "UsedKeyOnDoor", true);
AddUseItemCallback("", "Player", "script_area_2", "ActivateMonster", true);
AddEntityCollideCallback("servant_grunt_1", "monstergone_area", "MonsterGone", true, 1);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 3.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0.5f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0.5f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0.5f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_6", 0.5f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_9", 0.5f, "");
AddTimer("BlackOut", 0.0f, "TimerBlackOut");
}


void TimerBlackOut(string &in asTimer)
{
AddLocalVarInt("BlackoutStep", 1); //What step to play in the event
float fEventSpeed = 0.5f; //The default time between steps in an event

switch(GetLocalVarInt("BlackoutStep")) {
case 1:
StartPlayerLookAt("servant_grunt_1", 0.1f, 0.1f, "");
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 3.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0.5f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0.5f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0.5f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_6", 0.5f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_9", 0.5f, "");
FadeIn(4);
FadeImageTrailTo(2,1);
SetPlayerMoveSpeedMul(0.05f);
SetPlayerLookSpeedMul(0.05f);
PlaySoundAtEntity("pant", "react_pant.snt", "Player", 2, false);
fEventSpeed = 3.0f;
break;
case 2:
FadePlayerRollTo(85, 1, 1);
break;
case 3:
SetPlayerActive(true);
StartPlayerLookAt("blood_splatter04_3", 0.1f, 0.1f, "");
break;
case 4:
FadeImageTrailTo(0,1);
FadePlayerRollTo(65, 1, 1);
break;
case 5:
PlaySoundAtEntity("sigh", "react_sigh.snt", "Player", 1.0 / 2, false);
FadeOut(2);
fEventSpeed = 1.5f;
break;
case 6:
FadePlayerRollTo(85, 1, 4);
StartPlayerLookAt("key_torture_chamber_1", 0.1f, 0.1f, "");
break;
case 7:
FadeImageTrailTo(1.8f,1.5f);
FadePlayerFOVMulTo(1.25f, 0.01);
break;
case 8:
FadePlayerRollTo(45, 1, 2);
FadeIn(2);
fEventSpeed = 1.5f;
break;
case 9:
StartPlayerLookAt("wood_box2_1", 0.1f, 0.1f, "");
break;
case 10:
FadePlayerRollTo(15, 1, 2);
FadePlayerFOVMulTo(0.75f, 0.01);
break;
case 11:
PlaySoundAtEntity("sigh", "react_sigh.snt", "Player", 1.0 / 1.5f, false);
FadeOut(1);
StartPlayerLookAt("blood_splatter02_1", 1, 1, "");
FadePlayerRollTo(50, 1, 2);
fEventSpeed = 2.0f;
break;
case 12:
SetPlayerMoveSpeedMul(0.1f);
SetPlayerLookSpeedMul(0.1f);
StartPlayerLookAt("blood_splatter02_1", 1, 1, "");
FadePlayerFOVMulTo(1.1f, 0.01);
FadeImageTrailTo(0,1.5f);
fEventSpeed = 1.5f;
break;
case 13:
SetPlayerMoveSpeedMul(0.2f);
SetPlayerLookSpeedMul(0.2f);
FadePlayerRollTo(-15, 1, 2);
FadeIn(1);
StartPlayerLookAt("blood_splatter02_1", 2, 2, "");
fEventSpeed = 2.0f;
break;
case 14:
SetPlayerMoveSpeedMul(0.3f);
SetPlayerLookSpeedMul(0.3f);
FadePlayerRollTo(-30, 10, 60);
MovePlayerHeadPos(0, 0, 0, 1, 0.5f);
StartPlayerLookAt("prison_section_1", 1, 1, "");
FadePlayerFOVMulTo(0.9f, 0.01);
FadeImageTrailTo(1.5,2);
PlaySoundAtEntity("movement", "player_climb.snt", "Player", 0, false);
break;
case 15:
SetPlayerMoveSpeedMul(0.4f);
SetPlayerLookSpeedMul(0.4f);
FadePlayerRollTo(10, 10, 20);
MovePlayerHeadPos(0, -0.5f, 0, 1, 0.5f);
break;
case 16:
SetPlayerMoveSpeedMul(0.5f);
SetPlayerLookSpeedMul(0.5f);
FadePlayerRollTo(0, 10, 60);
MovePlayerHeadPos(0, 0, 0, 1, 0.5f);
StartPlayerLookAt("prison_section_1", 2, 2, "");
FadePlayerFOVMulTo(1, 0.01f);
PlaySoundAtEntity("movement", "player_climb.snt", "Player", 0, false);
SetPlayerCrouchDisabled(false);
fEventSpeed = 1.0f;
break;
case 17:
SetPlayerMoveSpeedMul(0.6f);
SetPlayerLookSpeedMul(0.6f);
FadeImageTrailTo(0,0.2f);
StopPlayerLookAt();
PlaySoundAtEntity("sigh", "react_sigh.snt", "Player", 1.0 / 1, false);
fEventSpeed = 1.0f;
break;
case 18:
SetPlayerJumpDisabled(false);
SetPlayerMoveSpeedMul(1.0f);
SetPlayerRunSpeedMul(1.0f);
SetPlayerLookSpeedMul(1.0f);
break;
}
RemoveTimer("BlackOut");

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("prison_section_1", false, true);
PlaySoundAtEntity("", "unlock_door", "prison_section_1", 0, false);
RemoveItem("key_torture_chamber_1");
}

void ActivateMonster(string &in asItem, string &in asEntity)
{
SetEntityActive("servant_grunt_2", true);
}

void MonsterGone(string &in asParent, string &in asChild, int alState)
{
FadeEnemyToSmoke("servant_grunt_1", false);
}


I've come to learn to not fear the living, nor the dead... But the monsters that hide in closets.
(This post was last modified: 05-25-2011, 03:56 PM by RawkBandMan.)
05-24-2011, 01:51 PM
Find Reply


Messages In This Thread
RE: Where can I find water? - by Greven - 05-08-2011, 05:19 PM
RE: Where can I find water? - by RawkBandMan - 05-08-2011, 05:44 PM
RE: Where can I find water? - by Simpanra - 05-08-2011, 08:33 PM
RE: Where can I find water? - by Greven - 05-08-2011, 09:22 PM
RE: Where can I find water? - by Simpanra - 05-08-2011, 09:28 PM
RE: Where can I find water? - by Greven - 05-08-2011, 09:32 PM
RE: Where can I find water? - by Simpanra - 05-08-2011, 09:33 PM
RE: Where can I find water? - by Greven - 05-08-2011, 09:38 PM
RE: Where can I find water? - by Simpanra - 05-08-2011, 09:46 PM
RE: Where can I find water? - by RawkBandMan - 05-08-2011, 09:50 PM
RE: Where can I find water? - by Roenlond - 05-08-2011, 08:31 PM
RE: Where can I find water? - by RawkBandMan - 05-08-2011, 09:18 PM
RE: Where can I find water? - by Simpanra - 05-08-2011, 09:59 PM
RE: Where can I find water? - by RawkBandMan - 05-08-2011, 10:27 PM
RE: Where can I find water? - by Karai16 - 05-08-2011, 11:22 PM
RE: Where can I find water? - by RawkBandMan - 05-09-2011, 12:01 AM
RE: extra_english now is working, but I need help with a different script :) - by RawkBandMan - 05-24-2011, 01:51 PM



Users browsing this thread: 1 Guest(s)