Jump to content

Scripting problems again.


JcHARP

Recommended Posts

OK how would I get it to set off a journal entry like for when you first arrive at the weynon priory if I get too close to a xmarker for example. I have something that may work but I might be using the wrong statements. Here is what I have so far.

 

Part of script BGM001

Begin Gamemode

 

If Player.GetItemCount unl001 == 1

If Player.GetDistance XMarkerunl001 <= 100

SetStage Unlquest001 == 40

 

EndIf

EndIf

End

Link to comment
Share on other sites

yes that will work fine... as long as it is a quest script on a running quest (not the best option), or on a item in players inventory or on a unique item near there (best option).

Also make sure to have a doOnce condition so that it doesn't repeatedly do the checks and commands.

also you might want to make that be a bigger distance, unless the player has to go close to it.

Pacific Morrowind

Link to comment
Share on other sites

OK how would I get it to set off a journal entry like for when you first arrive at the weynon priory if I get too close to a xmarker for example. I have something that may work but I might be using the wrong statements. Here is what I have so far.

 

Part of script BGM001

Begin Gamemode

 

If Player.GetItemCount unl001 == 1

If Player.GetDistance XMarkerunl001 <= 100

SetStage Unlquest001 == 40

 

EndIf

EndIf

End

the distances for scripting are in game units, not meters, yards, feet. 128 units is roughly equal to 6'. The script might not be working since the distance checked is so small.

 

Additionally, you may want to use some other conditions within that script so that the distance check only occurs during a very specific time. Getdistance is one of the few functions which can create significant performance loss if used by too many things at once. You might want to see about conditionalizing it so that it only checks during that stage of the quest.

 

Other ways to do this might be to instead use an activator in that cell to run the distance check and update the quest, rather than run this in the quest script so that the distance check will only run when the player is near that location. Or, since you're already altering the cell, just use a trigger zone instead of a distance check to advance the quest.

Link to comment
Share on other sites

Hmm seems not to work, I have it set to 1000 however when go to the marker which is the XMarker that I set it does not trigger the journal entry. An activator is an actor right like a NPC?
Link to comment
Share on other sites

Hmm seems not to work, I have it set to 1000 however when go to the marker which is the XMarker that I set it does not trigger the journal entry. An activator is an actor right like a NPC?

An activator is like a static, but it can have scripts attached.

 

Before doing that, you should probably ensure that your mod is active, that the xmarker is placed somewhere near the ground, and that your quest is currently running (quests which have not started yet will not run their scripts). If this is something to start a quest, you should use an activator or something exterior to start it, not the quest script.

Link to comment
Share on other sites

Ahhh lol i made yet another stupid error by my part... I had set the stage further then what i wanted it to process thus not allowing the journal entry to show up and skipping that part. Sorry guys and thanks for the hints if i did not check the stages i probably would still be stuck :D
Link to comment
Share on other sites

  • Recently Browsing   0 members

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