Sleep menu - dialog

Post » Wed Mar 11, 2015 3:24 am

I just ask simple question. Is here some way how to get sleep menu via dialog with NPC? Or is sleep menu accesible only from furnitures like bed/bedroll?

If yes, i would apreciate any advice/small quick hints how to do it.

PS: sry for my english, if is something bad wrotten, its not my native language

User avatar
Alycia Leann grace
 
Posts: 3539
Joined: Tue Jun 26, 2007 10:07 pm

Post » Tue Mar 10, 2015 11:33 pm

As far as I know, the Sleep/Wait menu can only be accessed by Furniture; maybe someone else knows how to pull it up?

What used to work in Oblivion, and I assume works the same in Skyrim is using Remote Activation. :

1) Create a new Cell

2) Place a bed in that Cell

3) Double-click the Bed and give it a Unique ID

4) Go to your Dialogue

5) In the Return Script enter something like...

MyBedRef.Activate(PlayerRef)

The issue here is... I've not done anything with Dialogue, so I don't know how you'd go about attaching the Script to that, or whether it would accept Properties... I assume that it does, but maybe someone else who knows more about working with Dialogue Scripts can help out there?

Either way, the first three steps will work--what you're basically doing is having the Player activate the object by script, and for that it does not have to be in the same Cell as the Player. :)

User avatar
Laura Ellaby
 
Posts: 3355
Joined: Sun Jul 02, 2006 9:59 am

Post » Wed Mar 11, 2015 8:09 am

CDM is right. You need to activate a bed via a script fragment in your dialogue. Just make an ObjectReference property and fill it with some dummy bed reference you've placed anywhere.

User avatar
Epul Kedah
 
Posts: 3545
Joined: Tue Oct 09, 2007 3:35 am

Post » Wed Mar 11, 2015 9:35 am

thx for showing me way how to do this, i try do it tommorow and i let u know if i sucess
User avatar
TASTY TRACY
 
Posts: 3282
Joined: Thu Jun 22, 2006 7:11 pm

Post » Wed Mar 11, 2015 11:58 am

Ok i stoped on papyrus fragment.

Problem is befor, i start making my own quest and dialog, i just want to test it how its works on what ever dialog, for example i was going to edit dialog with gerdur ,, What can you tell me about Riverwood?,, in quest DialogueRiverwood_Revised - DialogueRiverwoodBackground. I just thought adding that line would be all to work when i click compile and then edit script, but from forums i know papyrus fragment is used only like link to script what is atached to this function using bed in other cell.

So i must ask again and sry for taking your time, but need explain via some turtorial, where i have add this script to bed in cell, to quest with gerdur, or both where one extend another?

I know when u build script 1st line say about extending the object quest and so then u set some ,,property auto′′ and then i would maybe add line MyBedRef.Activate(PlayerRef)

but really i am not much sure if its enough.

User avatar
Sarah Knight
 
Posts: 3416
Joined: Mon Jun 19, 2006 5:02 am

Post » Wed Mar 11, 2015 3:00 am

Here is what i used to wrote, pls dont laugh i really dont know if i doing it all wrong just applied what i thought

------------------------------------------------------------------

Scriptname testsleep1234 extends TopicInfo Hidden
ObjectReference Property MyBed Auto
ReferenceAlias Property Player Auto
MyBed.Activate(Player)
------------------------------------------------------------------
User avatar
Richard
 
Posts: 3371
Joined: Sat Oct 13, 2007 2:50 pm

Post » Wed Mar 11, 2015 8:32 am

The function is called Activate(ObjectReference akActivator, bool abDefaultProcessingOnly = false)

This means that you cannot use a ReferenceAlias as akActivator. Instead your player property needs to be a objectreference or an actor (actor extends objectreference).

In one of your dialogue's script fragments, pass the line you mentioned yourself above:

MyBedRef.Activate(PlayerRef)

Then click on Properties and add two new properties; an objectreference property called MyBedRef and an actor property called PlayerRef. Fill these with the correct references.

User avatar
Laura Samson
 
Posts: 3337
Joined: Wed Aug 29, 2007 6:36 pm

Post » Wed Mar 11, 2015 7:47 am

In case you don't know: http://www.creationkit.com/
You should bookmark this site because it contains extremely helpful tutorials and documentation on events, script commands, etc.

Just wanted to leave this here.
User avatar
Sasha Brown
 
Posts: 3426
Joined: Sat Jan 20, 2007 4:46 pm

Post » Wed Mar 11, 2015 1:10 am

Ok so i pasted MyBedRef.Activate(PlayerRef) to Papyrus fragment end window, kliked compile, then i wanted to define properties to right klik on script i got error: ,,error encountered while attempting to reload the script,,

was trying define properties manually by open source and added them bellow:

;END FRAGMENT CODE - Do not edit anything between this and the begin comment

still dont know what i am missing

on forums i found these tif__00...random number scripts from some reason dont work or what, is there any other way how to atach script to dialog then compile and use script u get?

User avatar
David John Hunter
 
Posts: 3376
Joined: Sun May 13, 2007 8:24 am

Post » Wed Mar 11, 2015 3:41 am

Those tif_00(...) scripts are the ones the quest generates when you pass a line into the papyrus fragment. That's the only script that should be there, don't add your own - just to make sure you haven't done that.

Else try to close and open the quest.

User avatar
naomi
 
Posts: 3400
Joined: Tue Jul 11, 2006 2:58 pm

Post » Wed Mar 11, 2015 4:25 am

Look i made dialog, entered code to fragment, compiled, then i closed dialog reopenedm kliked right on script to edit properties - got error, continued and added property. I selected to type: Objectreference , name: MyBedRef - this was ok and one line from compiling was gone

then i wanted add property to player same type: ObjectReference and name: Player - by this one i m not sure cause i still receiving:

Starting 1 compile threads for 1 files...
Compiling "TIF__02002306"...
C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__02002306.psc(9,18): variable PlayerRef is undefined
No output generated for TIF__02002306, compilation failed.
Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on TIF__02002306
User avatar
Robert DeLarosa
 
Posts: 3415
Joined: Tue Sep 04, 2007 3:43 pm

Post » Wed Mar 11, 2015 5:58 am

Bah, i managed to work script now no compile problems selected property references, but always dont get after spoken lines of text from npc in dialog i dont receive effect of sleepmenu, just still getting black shadow animation in leg position on my cahracter what dont disapear even after reloading game.

Really there isnt any script comand to start sleep menu like when u was activating wait menu with button ,,T,,?

User avatar
Taylah Haines
 
Posts: 3439
Joined: Tue Feb 13, 2007 3:10 am

Post » Wed Mar 11, 2015 3:43 am

Ok i found one interesting mod. It let player sleep anywhere. This i could use into my dialogue, without using a bed or any other object. Just need to advice how can run spell or better effect of that spell on player, while i m in dialog (or ending dialog)?

Mod name: Sleep AnyWhere

User avatar
Cheville Thompson
 
Posts: 3404
Joined: Sun Mar 25, 2007 2:33 pm

Post » Wed Mar 11, 2015 4:43 am

Ok i give up was trying to set spell.cast(playerref) from mod abova but got the same isue like with MyBed.Activate(Player) , at least i learned much about doing quest and dialogs xD.

Curate, thx for advices but with my lack of experience not knowing where can be problem, i leave it be.

User avatar
Tracey Duncan
 
Posts: 3299
Joined: Wed Apr 18, 2007 9:32 am


Return to V - Skyrim