Jump to content

How to add quest after player sleeps in bed


kane4355

Recommended Posts

removed the registerforsleep function:

 

Scriptname DKQuestStart01 Extends AliasRef

import game
import debug

Quest Property DKMDQ01 Auto

Int Property ReqStage Auto

Int Property StageToSet Auto

Event OnSleepStop(bool abInterrupted)
        If DKMDQ01.GetStage() == ReqStage
        DKMDQ01.SetStage(StageToSet)
        EndIf
EndEvent

 

i got this error:

 

Starting 1 compile threads for 1 files...

Compiling "DKqueststart01"...

c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\DKqueststart01.psc(0,0): unable to locate script AliasRef

No output generated for DKqueststart01, compilation failed.

 

Batch compile of 1 files finished. 0 succeeded, 1 failed.

Failed on DKqueststart01

 

 

EDIT: replace AliasRef with ObjectReference and the compiler saves with no errors.

Edited by kane4355
Link to comment
Share on other sites

  • Replies 48
  • Created
  • Last Reply

Top Posters In This Topic

Yeah i've put an edit under my post. I think you should use ReferenceAlias, cause Alias extends the alias itself, while ReferenceAlias extends the object the alias is pointing to

 

yea i have to make changes. i tested it in game and didn't even work. ill try the ReferenceAlias

Link to comment
Share on other sites

okay so here is a breakdown of what i have so far before i test this and it doesnt work...

 

Quest created named DKMDQ01. "start game enabled", type Side quest.

 

Quest stage 0

Quest stage 10 Start up stage with log entry

Quest stage 20 (nothing yet, once i get start up built ill work the rest, although a player trigger isnt working correctly either in game but could be due to other reasons)

Quest stage 30 Shut down Stage Log entry empty, Complete Quest to my next quest, DKIHQ01

 

Quest objective:

objective index 20 "Read the blood Covered Book" display text, target reference DKMDbook (when tested in game and read book, quest completed, but never started)

 

Quest alias:

DKMDbook specific reference to object in cell, quest object, object is scripted to set stage to 30 and start a new quest.

playerown Specific reference to cell any and playerref. scripted DKqueststart01

Link to comment
Share on other sites

With "start up stage" you mean that you ticked the "start up stage" square?

 

If yes, the script won't work, cause when the quest starts it'll be automatically set to stage 10.

 

Untick it so when the quest starts (so when you first enable the esp), you are at stage 0.

 

Also, the stage 10 should have a "setobjectivedisplayed(20)" in fragments.

Link to comment
Share on other sites

Your setting should be this:

 

- quest with start game enabled

 

- Stage 0 with no log entry

 

- Stage 10 WITH NOTHING CHECKED with the log entry explaining the stuff and with the SetObjectiveDisplayed(20) fragment

 

- Stage 20 will be triggered when you open the book, marked as "complete quest" and with SetObjectiveCompleted(20) + DKIHQ01.Start() (first defined in properties)

 

- Stage 30 is useless with this setting

 

- Alias tab with the book alias and the player alias with the script inside

 

EDIT: also, when loading the game, type GetStage xxxxxx to check at wich stage you are when starting the game. It should be 0

Edited by gasti89
Link to comment
Share on other sites

Your setting should be this:

 

- quest with start game enabled

 

- Stage 0 with no log entry

 

- Stage 10 WITH NOTHING CHECKED with the log entry explaining the stuff and with the SetObjectiveDisplayed(20) fragment

 

- Stage 20 will be triggered when you open the book, marked as "complete quest" and with SetObjectiveCompleted(20) + DKIHQ01.Start() (first defined in properties)

 

- Stage 30 is useless with this setting

 

- Alias tab with the book alias and the player alias with the script inside

 

EDIT: also, when loading the game, type GetStage xxxxxx to check at wich stage you are when starting the game. It should be 0

 

stage 20 actually would be the player walking into the cell where the book is at. the book is actually referenced until stage 20.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...