Frictional Games Forum (read-only)
SOLVED CS Wont show up - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: SOLVED CS Wont show up (/thread-53457.html)

Pages: 1 2


RE: CS Wont show up - Lizard - 01-11-2017

Wierd. When I downloaded another custom_story both that and my own showed up


RE: CS Wont show up - FlawlessHappiness - 01-11-2017

Oh good Smile
So long as the problem is fixed.

Is it possible that maybe you had to restart Amnesia first, and you had not done that?

Anway, the problem is solved!


RE: CS Wont show up - Lizard - 01-11-2017

I always restart the game Wink

Now that i have you here i dont if you can help. it says that that something is wrong in line 51 in my script file like I miss a semi-colon, but i cant find any error


void OnStart()
{

//WakeUpScript Start
SetPlayerActive(false);
FadeOut(0);
FadePlayerRollTo(65, 20, 20);
MovePlayerHeadPos(-1, -0.45, -1.1, 20, 1);
FadeImageTrailTo(3, 1);
FadeRadialBlurTo(0.4, 1);
AddTimer("activate_player", 3, "FadeIn");
//WakeUpScript End

//Interacting With Bed
SetEntityPlayerInteractCallback("SleepArea", "Sleep", false);
}

//WakeUpScript Start
void FadeIn(string &in timer_name)
{
FadeIn(2);
AddTimer("MoveHead", 2, "WakeUp");
}

void WakeUp(string &in timer_name)
{
if (timer_name == "MoveHead")
{
FadeImageTrailTo(0, 1);
FadeRadialBlurTo(0, 1);
MovePlayerHeadPos(-0.5, -0.2, -1.1, 2, 2);
FadePlayerRollTo(0, 1.7, 500);
AddTimer("ActivatePlayer", 2, "WakeUp");
}

else if (timer_name == "ActivatePlayer")
{
MovePlayerHeadPos(0, 0, 0, 2, 2);
SetPlayerActive(true);

if (GetGlobalVarInt("SleepPoint") == 0)
{
SetMessage("Dialogs", "WakedUpByNoise", 0);
}

else if (GetGlobalVarInt("SleepPoint") == 1)
{
SetMessage("Journal", "Sleep1", 0);
}

else if (GetGlobalVarInt("SleepPoint") => 2)
{
SetMessage("Journal", "Sleep2", 0);
}
}
}
//WakeUpScript End

//Sleep Start
void Sleep(string &in asEnity)
{
SetPlayerActive(false);
AddGlobalVarInt("SleepPoints", 1);
StartPlayerLookAt("SleepLookAtArea", 5, 5, "");
FadeOut(3);
AddTimer("", 3, "teleportplayer");
}

void teleportplayer(string &in asTimer)
{
TeleportPlayer("PlayerStartArea_1");
FadePlayerRollTo(65, 20, 20);
MovePlayerHeadPos(-1, -0.45, -1.1, 20, 1);
FadeImageTrailTo(3, 1);
FadeRadialBlurTo(0.4, 1);
AddTimer("", 3, "FadeIn");
}
//Sleep End

void OnEnter()
{

}

void OnLeave()
{

}


RE: CS Wont show up - FlawlessHappiness - 01-11-2017

It seems you have a typo in WakeUp().
PHP Code:
else if (GetGlobalVarInt("SleepPoint") => 2
Should have been
PHP Code:
else if (GetGlobalVarInt("SleepPoint") >= 2
Think of it as saying "Greater or equal" instead of "Equal or greater".
"Greater or equal" is the way you would normally say it, and is also the right way to write it.

This seemed to fix it.


RE: CS Wont show up - Lizard - 01-11-2017

Ahh okay, thanks. Yes that fixed it. Thanks for the help mate Smile