Bed's and Scripting, Fun :D

Post » Wed Jun 29, 2011 6:17 am

In the mod http://planetelderscrolls.gamespy.com/View.php?view=Mods.Detail&id=2998, at one point in the quest, the PC is told to sleep in a bed and upon sleeping in it, is awoken to a Monster in a different cell. I was wondering how you would do that? I mean, let the player sleep, then awaken them after an hour as a "dream" then do the dream, then put them back to sleep?
User avatar
Crystal Clarke
 
Posts: 3410
Joined: Mon Dec 11, 2006 5:55 am

Post » Wed Jun 29, 2011 2:42 am

The simplest thing to do would be to load the mod in the CS and look at the script on that bed. How it was done should be there in black and white. :D





KF
User avatar
Barbequtie
 
Posts: 3410
Joined: Mon Jun 19, 2006 11:34 pm

Post » Wed Jun 29, 2011 8:28 am

I believe the variable function you need for that is GetPCSleep or so. It's basically done the same way as the Dark Brotherhood attacks. Just have a script start when the bed is activated that monitors for the player sleeping using that function.
User avatar
NEGRO
 
Posts: 3398
Joined: Sat Sep 01, 2007 12:14 am

Post » Wed Jun 29, 2011 12:25 am

*snip* then put them back to sleep?


You can't force the player to sleep - all you can do is bring up the restmenu again but the player can opt out of sleeping - your other option is to fade the screen for a few seconds and increase the gamehour

I've been playing with something similar in Nine and 1/2 weeks - though the player wakes up next to someone infinitely nicer than a monster :)
User avatar
gemma
 
Posts: 3441
Joined: Tue Jul 25, 2006 7:10 am

Post » Wed Jun 29, 2011 1:09 pm

Thanks for the comments, and the suggestion Illuminiel :D I believe I've got it figured out ;P
User avatar
Lifee Mccaslin
 
Posts: 3369
Joined: Fri Jun 01, 2007 1:03 am


Return to III - Morrowind