10-15-2012, 09:53 PM
10-16-2012, 07:08 AM
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
{
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
10-16-2012, 07:20 AM
there already is an tutorial for this: http://www.frictionalgames.com/forum/thread-4626.html
10-16-2012, 11:52 AM
(10-16-2012, 07:20 AM)Steve Wrote: [ -> ]there already is an tutorial for this: [url]http://www.frictionalgames.com/forum/thread-4626.html[/url]
Thank you very much! BTW, do you know how to move the player from a start point to another?
10-16-2012, 12:54 PM
By teleporting him. Just fade out, teleport, fade in.
10-16-2012, 03:12 PM
(10-16-2012, 12:54 PM)The chaser Wrote: [ -> ]By teleporting him. Just fade out, teleport, fade in.
What I want to do is make the player move or walk from a start point to another. To simulate he is actually getting off the bed.
10-16-2012, 03:29 PM
10-16-2012, 03:56 PM
(10-16-2012, 03:29 PM)beecake Wrote: [ -> ][url]http://www.frictionalgames.com/forum/thr...light=walk[/url]That's what I was looking for! Thank You
Search!!!
10-16-2012, 03:57 PM
I searched: Walk...