Frictional Games Forum (read-only)
Creating events at start of Custom Story - 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: Creating events at start of Custom Story (/thread-20773.html)



Creating events at start of Custom Story - Hailfiretank - 03-16-2013

Me again...

Basically, when my custom story starts:
I would like it to fade in, with the player forced to crouch (as if they are lying down), and looking at a script area called 'Roof_look'. Next, I would like them to wait 4 seconds and then look at an area called 'Chair_look', wait another 4 seconds and then look at an area called 'Room_look' (at which point, I will enable control, standing and not looking at the last area).

Anyone know how to make these events happen at the start of the custom story?

I know the scripts to make the player look at areas, to force them to crouch and timers; however, I do not know how to connect it all together.

Thanks for any help! Smile


RE: Creating events at start of Custom Story - ingedoom - 03-16-2013

There is an article covering this here. Try to search more thorughly.


RE: Creating events at start of Custom Story - PutraenusAlivius - 03-16-2013

(03-16-2013, 11:30 AM)ingedoom Wrote: There is an article covering this here. Try to search more thorughly.

Did you even read what event that he wanted? That is NOT the right one. Don't worry, once i make the script, i will edit this post!

PHP Code:
void OnStart()
{
    
AddEntityCollideCallback("Player" "StartArea" "FUNCTION" true 1);
}

void FUNCTION(string &in asParentstring &in asChildint alState)
{   
        
FadeIn(10);
        
SetPlayerCrouching(true);
        
StartPlayerLookAt("Roof_look"66"");
        
AddTimer(""4.0f"TimerLook");
}

void TimerLook(string &in asTimer)
{    
    
StopPlayerLookAt();
    
StartPlayerLookAt("Chair_look"66"");
        
AddTimer(""4.0f"TimerLookArea");
}

void TimerLookArea(string &in asTimer)
{    
    
StopPlayerLookAt();
    
StartPlayerLookAt("Room_look"66"");

Make a script area named StartArea at the player start position.


RE: Creating events at start of Custom Story - Hailfiretank - 03-16-2013

Sorted it, thanks! It was sort of a combination of the two resources that sorted it Smile