Hey folks, my mod partner and I are currently trying to learn how to mod & script, but we ran into a problem and could use some help.
EDIT: Figured it out. Scroll to the bottom for the solution.
The plan is, if player has finished the MainQuest and goes back to Whiterun, a Dremora will show up with the summon effect and then the player can kill him. This is proving to be somewhat confusing though since we're still learning Papyrus. Once we added the completion part for the MQ, it stopped working. I'm not sure if we should check for a specific quest stage or what.
Scriptname ubapoc_StartScript extends ObjectReference
ObjectReference property ubMessenger auto ;Dremora Messenger
ObjectReference property enterEffect auto ;Summon Effect
Quest property MainQuest auto ; Main Quest
Event onactivate(objectReference akActionRef)
if (MainQuest.IsCompleted()) ; Checks to see if quest is completed, but this line doesn't seem to work
ubMessenger.Enable(True) ; Makes messenger and effect
enterEffect.Enable(True)
EndIf
EndEvent
The character we're testing has definitely finished the MQ and we even tried to add:
MainQuest.CompleteQuest() ; Override MQ for debugging
Just prior to the if check, but it still doesn't work. Can someone give us some advice? Do we have to extend Quests maybe? If so, how do we extend both Quest and ObjectReference?
Any advice would be really helpful, we've been banging our heads about this for a while and figured we should just give in and ask. Thanks for your time!
EDIT: Figured it out. Hooray! I'm posting it in case it helps anyone out.
Scriptname ubapoc_StartScript extends ObjectReference
ObjectReference property ubMessenger auto ;Dremora Messenger
ObjectReference property enterEffect auto ;Summon Effect
Quest Property MQ305 Auto ; the final part of the MQ
Event onactivate(objectReference akActionRef)
If MQ305.GetStage() == 200 ; check stage of last step of the main quest
ubMessenger.Enable(True) ;Makes messenger and effect
enterEffect.Enable(True)
EndIf
EndEvent