Jump to content

run script upon quest completion


nognow

Recommended Posts

I'm creating a script to add a weapon to form lists/leveled lists upon a game quest's completion. I've already created the adder script itself, but I can't figure out how to set a condition when quest X is completed.

What's the best way to accomplish that?

Thanks!

 

Edit: Of course I can just add the condition the game's quest itself, but it's a very critical quest (the final Dead Money quest AKA finishing Dead Money DLC) and I don't want a tiny weapon script to modify it directly.

Link to comment
Share on other sites

You could make a quest that checks if that quest is done through a quest script. The condition you'd be looking for would be getquestcompleted:

 

https://geckwiki.com/index.php/GetQuestCompleted

 

Here is an example of the script:

scn AddWeaponQuestScript

short DoOnce ;give WEAPON once

begin GameMode

if DoOnce == 0
if (getquestcompleted VMS55a == 1);Whatever your quest ID is, this one is Tend to Your Business
set DoOnce to 1
player.additem WEAPON 1 ;give one WEAPON
endif
endif


end
Link to comment
Share on other sites

You'd use the "GetQuestCompleted [Quest ID] == 1" The best way to do this is to create your own quest under the Quests tab and Write a Begin Gamemode script and attach it to your newly made quest.

 

Example:

 

SCN WeaponListAdderSCR

 

Begin Gamemode

 

If GetQuestCompleted NVDLC01MQ03== 1

AddItemtoLeveledList LevelListID GunID 1 1 99

Endif

 

END

Link to comment
Share on other sites

 

You could make a quest that checks if that quest is done through a quest script. The condition you'd be looking for would be getquestcompleted:

 

https://geckwiki.com/index.php/GetQuestCompleted

 

Here is an example of the script:

scn AddWeaponQuestScript

short DoOnce ;give WEAPON once

begin GameMode

if DoOnce == 0
if (getquestcompleted VMS55a == 1);Whatever your quest ID is, this one is Tend to Your Business
set DoOnce to 1
player.additem WEAPON 1 ;give one WEAPON
endif
endif


end

Haha we both wrote it at the same time.

Link to comment
Share on other sites

 

You could make a quest that checks if that quest is done through a quest script. The condition you'd be looking for would be getquestcompleted:

 

https://geckwiki.com/index.php/GetQuestCompleted

 

Here is an example of the script:

scn AddWeaponQuestScript

short DoOnce ;give WEAPON once

begin GameMode

if DoOnce == 0
if (getquestcompleted VMS55a == 1);Whatever your quest ID is, this one is Tend to Your Business
set DoOnce to 1
player.additem WEAPON 1 ;give one WEAPON
endif
endif


end

 

 

 

 

You could make a quest that checks if that quest is done through a quest script. The condition you'd be looking for would be getquestcompleted:

 

https://geckwiki.com/index.php/GetQuestCompleted

 

Here is an example of the script:

scn AddWeaponQuestScript

short DoOnce ;give WEAPON once

begin GameMode

if DoOnce == 0
if (getquestcompleted VMS55a == 1);Whatever your quest ID is, this one is Tend to Your Business
set DoOnce to 1
player.additem WEAPON 1 ;give one WEAPON
endif
endif


end

Haha we both wrote it at the same time.

 

thanks!

Wouldn't it create bloating? I don't want that thing running constantly to check quest status.

Link to comment
Share on other sites

You could use the stopquest function:

 

https://geckwiki.com/index.php/StopQuest

 

Which with the example above should be:

scn AddWeaponQuestScript

short DoOnce ;give WEAPON once

begin GameMode

if DoOnce == 0
if (getquestcompleted VMS55a == 1);Whatever your quest ID is, this one is Tend to Your Business
set DoOnce to 1
player.additem WEAPON 1 ;give one WEAPON
StopQuest VMS55a
endif
endif


end
Link to comment
Share on other sites

  • Recently Browsing   0 members

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