Jump to content
ℹ️ Intermittent Download History issues ×

Making a script fire after a certain quest ends and only under specific conditions


puddlepond

Recommended Posts

I'm trying to write a script that gives the player a perk if the Think Tank (including Mobius) are alive and nonhostile after the ending slides of OWB. I've got the opposite working as a challenge that completes as soon as every aforementioned NPC is dead that I'd like to be unachievable after gaining this "pacifist" perk but I wouldn't even know where to start with that. I tried experimenting with this Dead Money script:

scn NVDLC01AllForOneTriggerScript

short bOnce

BEGIN OnActivate

	if (bOnce == 0)
		if (NVDLC01ChristineREF.GetDead == 0) && (NVDLC01DogREF.GetDead == 0) && (NVDLC01DeanREF.GetDead == 0)
			IncrementScriptedChallenge NVDLC01ChallengeAllForOne;
			set bOnce to 1;
		endif
	endif

	Activate;

END

obviously with the specific IDs and whatnot switched out but I ran into a few issues, the first being that I don't really know where those "NVDLC01ChristineREF" IDs are coming from. I don't really get what those "REF" IDs are or where they're being stored or defined so I don't know how I can get my own for the Think Tank NPCs. Secondly, the activator: I figure the door to the Sink would be the most logical place to trigger the script but that's a door that you keep revisiting both before and after the script should fire, in opposition to Dead Money's vault door activator that can only be used once.

 

My question is: how can I adapt this script to only fire once, under very specific conditions, then terminate so it can't be triggered again? And, even better, how can I use this script to remove the possibility of completing a separate challenge? I don't want the player to be able to complete a challenge to spare all of the Think Tank, then turn around and kill them all to gain both rewards.

Link to comment
Share on other sites

REFs are Obsidian's general tag for Reference Ids, the ID you can give to a specific object hand placed in the game world. the "REF" doesn't actually mean anything, it's just an identifier for human readability.

Challenge Reward scripts inherently on go off once, when the associated challenge is completed, so you don't need to do anything special.

 

The simplest way to keep the player from getting both rewards in a binary situation like this is to just have the Kill path reward script remove the Pacifist path reward from the player. (Remove functions called on something the player doesn't have won't cause any issues.)

As a design opinion, I think that's better anyway, since the player still has the capability of killing them after the arbitrary "end" of the dlc.

Edited by Radioactivelad
Link to comment
Share on other sites

  • Recently Browsing   0 members

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