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?
Streetboat Offline
Posting Freak

Posts: 1,099
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


Messages In This Thread
How to script waking up in a bed? - by willochill - 05-06-2012, 05:36 PM
RE: How to script waking up in a bed? - by Streetboat - 05-06-2012, 06:49 PM



Users browsing this thread: 1 Guest(s)