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


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Game Crashes (No Error issues)
Zypherzemus Offline
Member

Posts: 94
Threads: 7
Joined: Jul 2011
Reputation: 0
#4
RE: Game Crashes (No Error issues)

Yes, it works for other custom stories and the main game, it just happened recently (like this morning) , I was gonna post the demo today until I ran into this.

EDIT: Ok, I tried another level door on the same map to a different level and it works, then when I tried the door that crashes the game, I got an error saying "Unexpected End of file" (Line 199, 1)

/////////////////////////////
// Run first time starting map
void OnStart()
{
PlayMusic("07_amb.ogg", true, 100.0, 0.0, 0, true);
AddEntityCollideCallback("Player", "Key_Quest_Area", "GetKeyQuest", true, 1);
AddEntityCollideCallback("Player", "Key_Complete_Area", "FinishKeyQuest", true, 1);
AddEntityCollideCallback("Player", "Grunt_Area", "CollideGruntDoor", true, 1);
AddEntityCollideCallback("Player", "SlamDoorArea_1", "CollideSlamDoor", true, 1);
SetEntityPlayerInteractCallback("kitchendoor", "MementoDoorSlam_3", true);
SetEntityPlayerInteractCallback("kitchenkey_1", MomentoDoorSlamComplete", true);
}

void GetKeyQuest(string &in asParent, string &in asChild, int alState)
{
AddQuest("keyquest", "KeyQuest");
}

void FinishKeyQuest(string &in asParent, string &in asChild, int alState)
{
CompleteQuest("keyquest", "KeyQuest");
}

void CollideGruntDoor(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("eastwingdoor", true, true);
AddTimer("", 1.0f, "gruntsound");
FadeImageTrailTo(5.0f, 2.0f);
SetLampLit("candlestick_floor_9", false, true);
SetLampLit("candlestick_floor_10", false, true);
SetLampLit("candlestick_floor_11", false, true);
StartPlayerLookAt("eastwingdoor", 10.0f, 10.0f, "");
AddTimer("", 2.0f, "stoplook");
AddTimer("",3.0f, "gruntattack");
GiveSanityDamage(75.0f, true);
AddTimer("", 0.25f, "reaction");
StopMusic(1.0f, 0);
}

void reaction(string &in asTimer)
{
PlaySoundAtEntity("reaction", "react_breath.snt", "Player", 0.0f, false);
}

void gruntsound(string &in asTimer)
{
PlaySoundAtEntity("Sound_1", "notice_long.snt", "mansion_8", 2.0f, false);
PlayMusic("18_amb.ogg", true, 100.0, 0.0, 0, true);
}

void gruntattack(string &in asTimer)
{
SetEntityActive("servant_grunt_3", true);
SetEnemyIsHallucination ("servant_grunt_3", true);
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_23", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_28", 0.0f, "");
}

void stoplook(string &in asTimer)
{
StopPlayerLookAt();
StopPlayerLookAt();
}

void CollideSlamDoor(string &in asParent, string &in asChild, int alState)
{
AddTimer("", 0.0f, "Sounds");
StartPlayerLookAt("kitchendoor", 20.0f, 20.0f, "");
AddTimer("", 1.0f, "stoplook");
}

void Sounds(string &in asTimer)
{
PlaySoundAtEntity("boom", "hit_wood.snt", "kitchendoor", 0.0f, false);
SetSwingDoorClosed("kitchendoor", true, true);
SetSwingDoorLocked("kitchendoor", true, true);
GiveSanityDamage(50.0f, false);
}


void MementoDoorSlam_3(string &in entity)
{
AddQuest("KeyquestII", "KitchenKeyQuest");
}


void MomentoDoorSlamComplete(string &in asEntity)
{
CompleteQuest("KeyquestII", "KitchenKeyQuest");
}


////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "eastwingkey_1", "eastwingdoor", "UsedKeyOnDoor", true);
AddUseItemCallback("", "dinningroomkey_1", "dinningroomdoor", "UsedKeyOnDoor_2", true);
AddUseItemCallback("", "kitchenkey_1", "kitchendoor", "UsedKeyOnDoor_3", true);
AddUseItemCallback("", "peterskey_1", "petersroom", "UsedKeyOnDoor_4", true);
AddUseItemCallback("", "girlsdormkey_1", "girlsdorm", "UsedKeyOnDoor_5", true);
SetEntityPlayerInteractCallback("girlsdormkey_1", "GruntSwarm", true);
}

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

void UsedKeyOnDoor_2(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked("dinningroomdoor", false, true);
    PlaySoundAtEntity("", "unlock_door", "dinningroomdoor", 0, false);
    RemoveItem("dinningroomkey_1");
}

void UsedKeyOnDoor_3(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked("kitchendoor", false, true);
    PlaySoundAtEntity("", "unlock_door", "kitchendoor", 0, false);
    RemoveItem("kitchenkey_1");
}

void UsedKeyOnDoor_4(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked("petersroom", false, true);
    PlaySoundAtEntity("", "unlock_door", "petersroom", 0, false);
    RemoveItem("peterskey_1");
}

void UsedKeyOnDoor_5(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("girlsdormdoor", false);
    PlaySoundAtEntity("", "unlock_door", "girlsdormdoor", 0, false);
    RemoveUseItemCallback("girlsdormkey_1");
}

void GruntSwarm(string &in entity)
{
StopMusic(0.0f, 0);
SetSwingDoorClosed("petersroom", true, true);
SetLanternDisabled(true);
SetEntityActive("servant_grunt_2", true);
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_1", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_41", 0.0f, "");
SetEntityActive("servant_brute_2", true);
AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_17", 0.0f, "");
AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_41", 0.0f, "");
SetEntityActive("servant_brute_1", true);
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_43", 0.0f, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_41", 0.0f, "");
SetEntityActive("servant_grunt_1", true);
ShowEnemyPlayerPosition("servant_grunt_1");
SetLampLit("candlestick_floor_16", false, true);
SetLampLit("candlestick_floor_19", false, true);
SetLampLit("candlestick_floor_20", false, true);
SetLampLit("candlestick_floor_21", false, true);
SetLampLit("candlestick_floor_25", false, true);
SetLampLit("candlestick_floor_24", false, true);
SetLampLit("candlestick_floor_5", false, true);
SetLampLit("candlestick_floor_22", false, true);
SetLampLit("candlestick_floor_4", false, true);
SetLampLit("candlestick_floor_26", false, true);
SetLampLit("candlestick_floor_27", false, true);
SetLampLit("candlestick_floor_33", false, true);
SetLampLit("candlestick_floor_14", false, true);
SetLampLit("candlestick_floor_15", false, true);
SetLampLit("candlestick_floor_17", false, true);
SetLampLit("candlestick_floor_18", false, true);
SetLampLit("candlestick_tri_5", false, true);
SetLampLit("candlestick_wall_5", false, true);
SetLampLit("candlestick_wall_6", false, true);
SetLampLit("candlestick_wall_1", false, true);
SetLampLit("candlestick_wall_2", false, true);
SetLampLit("candlestick_wall_3", false, true);
SetLampLit("candlestick_wall_4", false, true);
SetLampLit("candlestick_wall_7", false, true);
SetLampLit("candlestick_wall_8", false, true);
SetLampLit("candlestick_wall_9", false, true);
SetLampLit("candlestick_wall_10", false, true);
SetLampLit("candlestick_wall_11", false, true);
SetLampLit("candlestick_wall_12", false, true);
SetLampLit("candlestick_wall_13", false, true);
SetLampLit("candlestick_wall_14", false, true);
SetLampLit("candlestick_wall_15", false, true);
}


////////////////////////////
// Run when leaving map
void OnLeave()
{
SetLanternDisabled(false);
StopMusic(0.0f, 0);
StopMusic(0.0f, 0);
}
(This post was last modified: 07-25-2011, 12:23 AM by Zypherzemus.)
07-24-2011, 10:56 PM
Find


Messages In This Thread
Game Crashes (No Error issues) - by Zypherzemus - 07-24-2011, 07:38 PM
RE: Game Crashes (No Error issues) - by xtron - 07-24-2011, 08:52 PM
RE: Game Crashes (No Error issues) - by MrCookieh - 07-24-2011, 09:09 PM
RE: Game Crashes (No Error issues) - by Zypherzemus - 07-24-2011, 10:56 PM
RE: Game Crashes (No Error issues) - by palistov - 07-25-2011, 01:38 AM
RE: Game Crashes (No Error issues) - by jens - 07-25-2011, 08:41 AM
RE: Game Crashes (No Error issues) - by Ardoetia - 02-19-2012, 04:49 PM



Users browsing this thread: 1 Guest(s)