+- 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: Script causing game to randomly crash (No FATAL ERROR) (/thread-7885.html)
I checked my hps, and those lines are correct (As far as I know.)
my hps
Spoiler below!
void onStart()
wakeUp();
void wakeUp ()
{
FadeOut(0); // Instantly fades the screen out. (Good for starting the game)
FadeIn(20); // Amount of seconds the fade in takes
FadeImageTrailTo(2, 2);
FadeSepiaColorTo(100, 4);
SetPlayerActive(false);
FadePlayerRollTo(50, 220, 220); // "Tilts" the players head
FadeRadialBlurTo(0.15, 2);
SetPlayerCrouching(true); // Simulates being on the ground
AddTimer("trig1", 11.0f, "beginStory"); // Change '11.0f' to however long you want the 'unconciousness' to last
}
RE: extra_english now is working, but I need help with a different script :) - Roenlond - 05-17-2011
First:
The syntax in parentheses is wrong. Since the command is "AddEntityCollideCallback", the script functions page http://wiki.frictionalgames.com/hpl2/amnesia/script_functions says that you should use:
void MyFunc(string &in asParent, string &in asChild, int alState)
the code should work besides that, as long as the callback is inside a function (void OnStart in most cases). Syntax errors are one of the nastiest; they don't give any errors but the function won't work anyhow.
void wakeUp ()
{
FadeOut(0); // Instantly fades the screen out. (Good for starting the game)
FadeIn(20); // Amount of seconds the fade in takes
FadeImageTrailTo(2, 2);
FadeSepiaColorTo(100, 4);
SetPlayerActive(false);
FadePlayerRollTo(50, 220, 220); // "Tilts" the players head
FadeRadialBlurTo(0.15, 2);
SetPlayerCrouching(true); // Simulates being on the ground
AddTimer("trig1", 11.0f, "beginStory"); // Change '11.0f' to however long you want the 'unconciousness' to last
}
Forgot a quote around the monster name in two areas.
RE: extra_english now is working, but I need help with a different script :) - RawkBandMan - 05-17-2011
(05-17-2011, 03:55 PM)Roenlond Wrote: First:
The syntax in parentheses is wrong. Since the command is "AddEntityCollideCallback", the script functions page http://wiki.frictionalgames.com/hpl2/amnesia/script_functions says that you should use:
void MyFunc(string &in asParent, string &in asChild, int alState)
the code should work besides that, as long as the callback is inside a function (void OnStart in most cases). Syntax errors are one of the nastiest; they don't give any errors but the function won't work anyhow.
void wakeUp ()
{
FadeOut(0); // Instantly fades the screen out. (Good for starting the game)
FadeIn(20); // Amount of seconds the fade in takes
FadeImageTrailTo(2, 2);
FadeSepiaColorTo(100, 4);
SetPlayerActive(false);
FadePlayerRollTo(50, 220, 220); // "Tilts" the players head
FadeRadialBlurTo(0.15, 2);
SetPlayerCrouching(true); // Simulates being on the ground
AddTimer("trig1", 11.0f, "beginStory"); // Change '11.0f' to however long you want the 'unconciousness' to last
}
void wakeUp()
{
FadeOut(0); // Instantly fades the screen out. (Good for starting the game)
FadeIn(20); // Amount of seconds the fade in takes
FadeImageTrailTo(2, 2);
FadeSepiaColorTo(100, 4);
SetPlayerActive(false);
FadePlayerRollTo(50, 220, 220); // "Tilts" the players head
FadeRadialBlurTo(0.15, 2);
SetPlayerCrouching(true); // Simulates being on the ground
AddTimer("trig1", 11.0f, "beginStory"); // Change '11.0f' to however long you want the 'unconciousness' to last
}