nognow Posted December 26, 2020 Share Posted December 26, 2020 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 More sharing options...
clanky4 Posted December 26, 2020 Share Posted December 26, 2020 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 More sharing options...
ashtonlp101 Posted December 26, 2020 Share Posted December 26, 2020 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== 1AddItemtoLeveledList LevelListID GunID 1 1 99Endif END Link to comment Share on other sites More sharing options...
ashtonlp101 Posted December 26, 2020 Share Posted December 26, 2020 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 More sharing options...
nognow Posted December 26, 2020 Author Share Posted December 26, 2020 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 More sharing options...
clanky4 Posted December 27, 2020 Share Posted December 27, 2020 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 More sharing options...
nognow Posted December 27, 2020 Author Share Posted December 27, 2020 But that's only after the quest has been completed. Beforehand, it'll keep running until I complete the in-game quest Link to comment Share on other sites More sharing options...
GamerRick Posted December 27, 2020 Share Posted December 27, 2020 Why not put your code in the result script of your quest stage that ends the quest? Link to comment Share on other sites More sharing options...
nognow Posted December 27, 2020 Author Share Posted December 27, 2020 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. Link to comment Share on other sites More sharing options...
GamerRick Posted December 28, 2020 Share Posted December 28, 2020 OK. In that case, the first response you got from Clanky4 is the answer. Link to comment Share on other sites More sharing options...
Recommended Posts