Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Creating events at start of Custom Story
Hailfiretank Offline
Junior Member

Posts: 33
Threads: 12
Joined: Jun 2012
Reputation: 0
#1
Creating events at start of Custom Story

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
03-16-2013, 10:50 AM
Find
ingedoom Offline
Member

Posts: 120
Threads: 12
Joined: Feb 2012
Reputation: 0
#2
RE: Creating events at start of Custom Story

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

[Image: 23778.png]
03-16-2013, 11:30 AM
Website Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#3
RE: Creating events at start of Custom Story

(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: (Select All)
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.

"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 03-16-2013, 12:34 PM by PutraenusAlivius.)
03-16-2013, 12:25 PM
Find
Hailfiretank Offline
Junior Member

Posts: 33
Threads: 12
Joined: Jun 2012
Reputation: 0
#4
RE: Creating events at start of Custom Story

Sorted it, thanks! It was sort of a combination of the two resources that sorted it Smile
03-16-2013, 06:12 PM
Find




Users browsing this thread: 1 Guest(s)