Frictional Games Forum (read-only)

Full Version: Creating events at start of Custom Story
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
There is an article covering this here. Try to search more thorughly.
(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.
Sorted it, thanks! It was sort of a combination of the two resources that sorted it Smile