Jump to content

Recommended Posts

Ok so I creating a mod but have ran into to a problem with this custom script so how the script is suppose to start a hidden quest that has a script hidden in the quest so basically say equip this said ring it starts quest and when unequipped it stops said quest so like this

 

begin onequip

player.startquest (quest id)

end

begin onunequip

player.stopquest (same quest id)

end

 

but when I try the script it doesn't work, now when I use the console and add the quest the quest works so yea plz explain what I'm doing wrong

Edited by Godschildgaming
Link to comment
Share on other sites

The SetStage, StartQuest and StopQuest commands do not need to be called on anything. See the wiki:

StartQuest YourQuestID
SetStage YourQuestID 10
StopQuest YourQuestID

StartQuest and StopQuest start and stop the quest script according to the wiki. If that is all you need, as in, you only have a script with a GameMode block in your quest and you need to toggle that script, you do not need the SetStage command.

 

And another tip: you can try specifying an actor to filter your OnEquip and OnUnequip events, to make sure an NPC equipping your item does not trigger the quest start and stop. More here:

scriptname YourAwesomeItemScript

begin OnEquip PlayerRef
    StartQuest YourAwesomeQuestID
end

begin OnUnequip PlayerRef
    StopQuest YourAwesomeQuestID
end

Also, a quest script normally runs every five seconds (the default value for all scripts by default, although the default can be changed too I think). To force a quest script to run at an interval other than the default one, you can include a simple fQuestDelayTime variable definition in your quest script. Like this:

scriptname YourAwesomeQuestScript

float fQuestDelayTime

begin GameMode
    MessageBox "Hey! The quest script ran! Woohoo!"
end

You can change the variable with normal variable assignment. The change should take effect immediately. There is also this wiki page here: http://cs.elderscrolls.com/index.php?title=Quest_scripts

 

Hopefully that helps a bit. Anyone feel free to correct.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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