Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to script waking up in a bed?
Author Message
willochill Offline
Member

Posts: 72
Joined: Apr 2011
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Streetboat Offline
Posting Freak

Posts: 903
Joined: Mar 2011
Reputation: 39
Post: #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 all posts by this user Quote this message in a reply
Your Computer Offline
SCAN ME!

Posts: 3,475
Joined: Jul 2011
Reputation: 234
Post: #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
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)