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
Wake Up Script
Curse of Hope Offline
Junior Member

Posts: 23
Threads: 1
Joined: Oct 2012
Reputation: 3
#2
RE: Wake Up Script

void OnStart()
{
FadeOut(0.0f);
SetPlayerActive(false);
FadePlayerRollTo(50, 150, 150);
SetPlayerCrouching(true);
AddTimer("Wakeup", 10.0, "Wakeup");
}
void Wakeup(string &in asTimer)
{
SetPlayerActive(true);
FadeIn(3.0f);
FadePlayerRollTo(0, 33, 33);
SetPlayerCrouching(false);
PlaySoundAtEntity("", "player_cough.snt", "Player", 0, false);
}


There are other ways to do it, but this is the most basic one in my oppinion.
The cough sound effect is not needed, but it sounds and looks better. (:
If you dont understand what's happening here, this is an explanation:
When the map starts, the screen will be faded out, the player will crouch and the
screen will be twisted sideways which gives you the feeling that your laying down.
The timer is set on 10 seconds, and when it goes off it will trigger the timer function
below which fades and twists the screen back to normal. The Player is also not
active during this process, so wont be able to walk away during the time the script
is active.
Hope this helped you out // Joakim

Work In Progress - Slender: Curse of Hope
(This post was last modified: 10-16-2012, 07:17 AM by Curse of Hope.)
10-16-2012, 07:08 AM
Find


Messages In This Thread
Wake Up Script - by 4WalledKid - 10-15-2012, 09:53 PM
RE: Wake Up Script - by Curse of Hope - 10-16-2012, 07:08 AM
RE: Wake Up Script - by Steve - 10-16-2012, 07:20 AM
RE: Wake Up Script - by 4WalledKid - 10-16-2012, 11:52 AM
RE: Wake Up Script - by The chaser - 10-16-2012, 12:54 PM
RE: Wake Up Script - by 4WalledKid - 10-16-2012, 03:12 PM
RE: Wake Up Script - by FlawlessHappiness - 10-16-2012, 03:29 PM
RE: Wake Up Script - by 4WalledKid - 10-16-2012, 03:56 PM
RE: Wake Up Script - by FlawlessHappiness - 10-16-2012, 03:57 PM



Users browsing this thread: 1 Guest(s)