Frictional Games Forum (read-only)
[SCRIPT] Fadein ? or Wake 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: [SCRIPT] Fadein ? or Wake up (/thread-24779.html)

Pages: 1 2 3


RE: Fadein ? or Wake up - Straxedix - 03-08-2014

Uffffff
So lang need to get only ???
SetMessage
And Hps got (string& asTextCategory, string& asTextEntry, float afTime); ?

Can make .lang what to copy and .hps what to copy pleaseee Sad Sad


RE: Fadein ? or Wake up - PutraenusAlivius - 03-08-2014

(03-08-2014, 02:23 PM)Straxedix Wrote: Uffffff
So lang need to get only ???
SetMessage
And Hps got (string& asTextCategory, string& asTextEntry, float afTime); ?

Can make .lang what to copy and .hps what to copy pleaseee Sad Sad
ffs

SetMessage(string& asTextCategory, string& asTextEntry, float afTime); should be in the HPS.

<CATEGORY Name="TextCategory">
<Entry Name="TextEntry"> Insert message here</Entry>
</CATEGORY>

Should be in the Lang.


RE: Fadein ? or Wake up - Straxedix - 03-08-2014

i set all like that
and in .hps file
SetMessage(string& asTextCategory, string& asTextEntry, float afTime);
so it come error says:Expexcted indentifier


RE: Fadein ? or Wake up - PutraenusAlivius - 03-08-2014

(03-08-2014, 02:39 PM)Straxedix Wrote: i set all like that
and in .hps file
SetMessage(string& asTextCategory, string& asTextEntry, float afTime);
so it come error says:Expexcted indentifier

You changed the string names according to your HPS. Example:
Spoiler below!

HPS
PHP Code:
SetMessage("ExampleCategory""ExampleText"0); 

LANG
PHP Code:
<CATEGORY Name="ExampleCategory">
<
Entry Name="ExampleText">This is the text that will appear.</Entry>
</
CATEGORY

It'll appear in game as;
PHP Code:
This is the text that will appear




RE: Fadein ? or Wake up - Straxedix - 03-08-2014

.lang looks like this now
<CATEGORY Name="TextCategory">
<Entry Name="TextEntry">What Happened? Where im i?</Entry>
</CATEGORY>
.hps looks like this now
SetMessage(string& TextCategory, string& TextEntry, float 0);

and again same error


RE: Fadein ? or Wake up - PutraenusAlivius - 03-08-2014

(03-08-2014, 02:51 PM)Straxedix Wrote: .lang looks like this now
<CATEGORY Name="TextCategory">
<Entry Name="TextEntry">What Happened? Where im i?</Entry>
</CATEGORY>
.hps looks like this now
SetMessage(string& TextCategory, string& TextEntry, float 0);

and again same error

Correction:
It's SetMessage("TextCategory", "TextEntry", 0);


RE: Fadein ? or Wake up - Straxedix - 03-08-2014

.lang looks
SetMessage("TextCategory", "TextEntry", 0);
same error i sooo anoying you and im sorry but let's fix it Sad Sad Sad


RE: Fadein ? or Wake up - PutraenusAlivius - 03-08-2014

(03-08-2014, 03:00 PM)Straxedix Wrote: .lang looks
SetMessage("TextCategory", "TextEntry", 0);
same error i sooo anoying you and im sorry but let's fix it Sad Sad Sad

Lang was correct, but the HPS wasn't.

That was supposed to be in the HPS so yeah. It's okay as long as you're learning.


RE: Fadein ? or Wake up - Straxedix - 03-08-2014

oh god my misstake in TYPING it is in .hps not in .lang

but again same error iwn it is in .hps

SomethingRidiculous
lang it's ok
hps
look like this:


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
}

void beginStory(string &in asTimer){
ChangePlayerStateToNormal();
SetPlayerActive(true);
FadePlayerRollTo(0, 33, 33); // Change all settings to defaults
FadeRadialBlurTo(0.0, 1);
FadeSepiaColorTo(0, 4);
SetPlayerCrouching(false);
FadeImageTrailTo(0,1);
}
SetMessage("TextCategory", "TextEntry", 0);

have idea what went wrong ???


RE: Fadein ? or Wake up - PutraenusAlivius - 03-08-2014

SetMessage is not defined in a callback function. Functions like SetMessage and AddEntityCollideCallback, etc. has to be on one of the brackets.

PHP Code:
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(22);
FadeSepiaColorTo(1004);
SetPlayerActive(false); 
FadePlayerRollTo(50220220); // "Tilts" the players head
FadeRadialBlurTo(0.152);
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 beginStory(string &in asTimer){
ChangePlayerStateToNormal();
SetMessage("TextCategory""TextEntry"0);
SetPlayerActive(true);
FadePlayerRollTo(03333); // Change all settings to defaults
FadeRadialBlurTo(0.01);
FadeSepiaColorTo(04);
SetPlayerCrouching(false);
FadeImageTrailTo(0,1);