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


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

Hello evrybody! this is my second post (im so anoying xD)
But i need help with some script
I think evrybody of you play New Game in Amnesia and you come to start that far Big Grin
Yeah im talking about start he is moving through doors you can't move Player or do anything and there is voice and text
No no don't worry i don't need that much Big Grin
I need just to woke up a little shake and stand up then 1 text like
"What happened?"
So if can anyone do this IM NOOB in script Cool
If you do it without text or with the text it's same to me just to shake on floor then stop shaking stand up and you can controll player if understand me maaan

Sorry for my bad English Blush
Second post! we going good.



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

Use WakeUp, FadeIn is basically just the screen fading to white.


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

Can make script to paste it in my .hps file i say IM NOOB in script xD


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

PHP Code:
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();
    
SetPlayerActive(true);
    
FadePlayerRollTo(03333);        // Change all settings to defaults
    
FadeRadialBlurTo(0.01);
    
FadeSepiaColorTo(04);
    
SetPlayerCrouching(false);
    
FadeImageTrailTo(0,1);


Put the text "wakeUp();" in OnStart without the quotation marks.


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

So it's need to be like this ???

void OnStart()
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);
}


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

Nope.

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();
    
SetPlayerActive(true);
    
FadePlayerRollTo(03333);        // Change all settings to defaults
    
FadeRadialBlurTo(0.01);
    
FadeSepiaColorTo(04);
    
SetPlayerCrouching(false);
    
FadeImageTrailTo(0,1);




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

Yeah so can you make the white text while he is down and WHEN HE STAND UP it comes "What happened?"
That's my last wish Big Grin


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

(03-08-2014, 02:08 PM)Straxedix Wrote: Yeah so can you make the white text while he is down and WHEN HE STAND UP it comes "What happened?"
That's my last wish Big Grin

I can, it's quite simple, but I'm definitely NOT gonna do that. Insert this to the script when he wakes up.
PHP Code:
SetMessage(stringasTextCategorystringasTextEntryfloat afTime); 

asTextCategory - Category of the text
asTextEntry - Entry of the text. Entry MUST BE in the Category earlier
afTime - How long the message will appear (in seconds)


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

Ok but did neeed something to go in .lang file ?
Or this:SetMessage(string& asTextCategory, string& asTextEntry, float afTime); go to .lang file or .hps file
you confused me a little now Sad


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

(03-08-2014, 02:17 PM)Straxedix Wrote: Ok but did neeed something to go in .lang file ?
Or this:SetMessage(string& asTextCategory, string& asTextEntry, float afTime); go to .lang file or .hps file
you confused me a little now Sad

The SetMessage is on the HPS file, whilst the Category and Entry is at the .lang.

Please note that the lang and the HPS doesn't have the same format and thus if you copy stuff from the HPS to the Lang or vice versa you cannot do it.