Jump to content

Modding Help


Muralin

Recommended Posts

Hi everyone, i'm trying to solve a little problem:

 

I have a quest where an npc is escorting the player character from Cheydinhal to Bruma. On the walk there, there is supposed to be a point where the stage updates and the npc starts a conversation with the player (happens right before the Roxey Inn halfway between the two towns). I thought using a simple trig zone on the road with a script would do the trick for changing the quest stage:

 

Scriptname TrigZone01Script
Begin OnTrigger player
if ( Getstage AAAQuest == 10 )
if ( NPCRef.GetDistance Player < 500 )
NPCRef.StartConversation Player
setstage AAAQuest 20
endif
endif
End
I have tried that and other variations, but it doesn't trigger the new stage at all. I have used a similar trigger zone script in an interior for a different quest with success, so my assumption is that trigger zones don't work in the exterior world? (My guess)
So I was wondering if there is a script I can make where it will trigger stage 20 when I get to a certain spot outside of the Roxey Inn. Any help is appreciated, thanks.
Link to comment
Share on other sites

Trigger zones do work in exteriors. StartConversation can take a topic ID as a parameter if that would help: http://cs.elderscrolls.com/index.php?title=StartConversation

 

Also, the wiki says StartConversation can fail occasionally. And you can also set the quest stage in the topic result script (the white box above conditions in the CS, remember to press compile).

Begin OnTrigger PlayerRef

    If ( Getstage AAAQuest != 10 )
        Return
    EndIf

    If ( NPCRef.GetDistance Player < 500 )
        NPCRef.StartConversation PlayerRef GREETING
        ; SetStage AAAQuest 20 <-- move this to the topic result script, it should help a bit
    EndIf

End

Also, if you could think of a nice prefix for your objects, scripts and all that. For example, it is possible that these ones are pretty common, and in case you want to use their Editor IDs in-game one day, it would be handy to have something more unique, at least for the quest, maybe:

  • TrigZone01Script
  • AAAQuest
  • NPCRef

For example "TrigZone01Script" sounds like it might overwrite with something already in the game. I am not sure if it will, probably not, but having too generic editor IDs can sometimes cause all sorts of strange things, and having meaningful prefixes fixes that. For example I have used either an abbreviation of the mod name itself, or the full mod name, in case it is a short one (<20 chars). Chances are it will save you some headaches. Just a thought.

 

If you wanted a prefix like AAA to make it sort to the top, you can instead use the Construction Set Extender and it will automatically both colour-code the objects with green and sort them to the top (by default): http://www.nexusmods.com/oblivion/mods/36370/?

 

Hopefully that helps you get a little bit forward. :smile:

 

Edit: You can place a messagebox in the trigger script to see if it triggers. It might also be worth noting that 500 is not too far away, and that the guest stage is always the highest number it has ever been. If you do this:

SetStage Quest 10
SetStage Quest 50
SetStage Quest 20

It will return 50 when you call GetStage.

Edited by Contrathetix
Link to comment
Share on other sites

  • Recently Browsing   0 members

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