Jump to content

[Scripting Question]Using OnLoad to advance quest stage?


jakeohara

Recommended Posts

Hey all, long time lurker first time poster.

 

I've recently started experimenting with modding New Vegas using Geck, and I've run into some scripting problems. What I'm trying to do is use the OnLoad function to advance to the next stage in the quest, the script I'm using is this

SCN NCFOMQTrigger

BEGIN onLoad

	if (getStage NCFOMQ < 5)
		setstage NCFOMQ 5
	elseif (getStage NCFOMQ <= 20)
		setstage NCFOMQ 30
	endif

END

Without boring you with the details, the Courier comes across a crime scene and the quest objective implores him/her to investigate further. The above script saves in GECK so I know it is valid, but when I attach it to one of the dead NPCs at the crime scene, nothing happens.

 

If I replace the onLoad function with "OnAdd player" and attach the script to an object at the crime scene, the quest advances when the player adds the item to their inventory, so clearly the only part of this that doesn't work is the onLoad. Is this a possible use of the onLoad function and if not, what should I be trying to do instead?

Link to comment
Share on other sites

Are you sure it doesn't work? Travel to a different location, wait/sleep for three days, then return and check again.

In exterior cells, the OnLoad block type runs once, every time you visit the cell after it has been reloaded (every three days). So, if you returned to the cell before three days have passed since your last visit, the body will be there, but the script will not run.

 

If it still does not work, try using a Cubic Activator, and in the script use OnTriggerEnter player (instead of OnLoad).

Link to comment
Share on other sites

  • Recently Browsing   0 members

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