Jump to content

How do you get the enable function to work? :(


whitehawk69

Recommended Posts

I creating a quest mod for Skyrim at the moment and I've been getting to grips with the new Papyrus scripting language. Annoyingly, I can't seem to get the simple thing of enabling a reference to work, (even after looking through the Quest tutorials on the Creation Kit websites). So at the moment, I have a quest with a stage set after some spoken dialogue ( GetOwningQuest.SetStage(X) ) this works. I also have a quest alias (a "specific reference" with the Allow Disabled flag checked) for the reference I want an enabling - an NPC who's reference is initially disabled - in the result script for the quest stage I have the command "Alias_X.GetReference().Enable()" but it's not working! The NPC is seemingly still disabled and even if I have them enabled to begin with, they don't show up as a quest target for the stage even though I have them as a target!

 

Does anyone have any idea how to sort this out? :(

 

Thanks

Link to comment
Share on other sites

I creating a quest mod for Skyrim at the moment and I've been getting to grips with the new Papyrus scripting language. Annoyingly, I can't seem to get the simple thing of enabling a reference to work, (even after looking through the Quest tutorials on the Creation Kit websites). So at the moment, I have a quest with a stage set after some spoken dialogue ( GetOwningQuest.SetStage(X) ) this works. I also have a quest alias (a "specific reference" with the Allow Disabled flag checked) for the reference I want an enabling - an NPC who's reference is initially disabled - in the result script for the quest stage I have the command "Alias_X.GetReference().Enable()" but it's not working! The NPC is seemingly still disabled and even if I have them enabled to begin with, they don't show up as a quest target for the stage even though I have them as a target!

 

Does anyone have any idea how to sort this out? :(

 

Thanks

 

Try

Alias_X.Enable()

Edited by PaladinRider
Link to comment
Share on other sites

What Paladin said. I think that the whole idea of the aliases was to not to state direct (hex)references in the scripting anymore.

 

Check the house upgrading quests. They're use a few stuff to making enabling/disabling stuff easily (like the xmarkers having all the upgrades as childs, so enabling the xmarker enables all the upgrades at once)

Link to comment
Share on other sites

Please post the code you used. Ensure that your alias is set properly. You should be using a property, actually.

 

Okay this is how I have things:

 

The reference that I have disabled has been given a Reference Editor ID, the Persist Location has been set to Persist All, it has NO Parent References, the Location Reference type has been set to Boss and the initially disabled flag is checked

The Actor that this reference is has the Unique flag checked and has a script on them which looks like this

 

Scriptname [script name] extends ObjectReference

 

Quest Property [Quest ID] Auto

 

ReferenceAlias Property [Property name] Auto

 

The quest (which has the Start Game Enabled flag checked) has the Alias (lets call it 'Alias X') in question with the Allow Disabled flag checked is a Specific Reference that points to the reference mentioned earlier.

The script in the quest stage is this:

 

Alias_X.GetActorReference().Enable()

SetObjectiveDisplayed(20)

 

Hope you can figure it out because I sure can't!

 

Thanks :thumbsup:

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...