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
How to script waking up in a bed?
Author Message
willochill Offline
Member

Posts: 73
Threads: 27
Joined: Apr 2011
Reputation: 0
#1
How to script waking up in a bed?

I want to start off with a kind of cliche "wake up in a bed, look around, then get out of the bed" type of thing. Only thing is, I don't know how to script it. Do I have to rotate the player start area so that the player starts sideways? Then how to I get him out of the bed? Please give me some suggestions.
05-06-2012, 05:36 PM
Find Reply
Streetboat Offline
Posting Freak

Posts: 1,098
Threads: 40
Joined: Mar 2011
Reputation: 56
#2
RE: How to script waking up in a bed?

You don't script this kind of thing in the level editor. What you've gotta do is place a couple of script areas around the room in the exact location you want the player's view to be centered at, so where you want him to look in the room is where you place these script areas. Then, in your .hps file for that level, under the 'OnStart' section, you would use FadeOut with a time of 0 seconds, then FadeIn with however much time you want, then throw some timers in there, with each timer using StartPlayerLookAt and telling the player to look around at the various scriptareas in the room, by name. Don't forget to use StopPlayerLookAt(); to give back player control once you are satisfied with him looking around! And throw some PlaySoundAtEntity funcs to make the player breathe, and if you're feeling fancy, use FadeSepiaColorTo and FadeImageTrailTo to imitate grogginess upon waking up. Hope that helps Smile

[Image: signature-2.png]
05-06-2012, 06:49 PM
Find Reply
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#3
RE: How to script waking up in a bed?

http://www.youtube.com/watch?v=WWLgrSIbx...8&index=18

Tutorials: From Noob to Pro
05-06-2012, 07:00 PM
Website Find Reply




Users browsing this thread: 1 Guest(s)