Jump to content

Recommended Posts

Posted

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.

Posted

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
Posted

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

Posted
  On 12/26/2020 at 6:32 PM, clanky4 said:

 

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.

Posted
  On 12/26/2020 at 6:32 PM, clanky4 said:

 

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

 

 

  On 12/26/2020 at 6:40 PM, ashtonlp101 said:

 

  On 12/26/2020 at 6:32 PM, clanky4 said:

 

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.

Posted

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
Posted
  On 12/27/2020 at 2:08 PM, GamerRick said:

Why not put your code in the result script of your quest stage that ends the quest?

As I noted, I'm afraid of letting some tiny weapon adder to modify such a critical quest (referenced 205 times) directly.

  • Recently Browsing   0 members

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