smusini Posted September 8, 2022 Share Posted September 8, 2022 (edited) I've followed a tutorial (https://forums.nexusmods.com/index.php?/topic/558795-script-tutorial-script-initialization-on-game-load/) on how to create a quest just to execute a script, but how can i then use that script to check other things, like did the player kill someone, did the player die... ?What i aim for is to have an always active script, that has some values stored, and that cheks specific things and acts upon them: i guess mods that have survival elements like hunger, cold ecc work like that?Thx for helping this newbie Edited September 8, 2022 by smusini Link to comment Share on other sites More sharing options...
IsharaMeradin Posted September 11, 2022 Share Posted September 11, 2022 It really depends on what you want to do. Some scenarios will require a separate script on the object or an alias pointing to the object in question. That script then either pulls needed data from the "master script" or it might run functions on the "master script" to manipulate data for use by other things. If your script is attached to an alias pointing to the player, then you can include the events OnDeath and OnDying to catch when the player has died or is dying. Player targets that die would need those events to run from their perspective. I'm not sure on the best way to achieve this. I utilized a separate quest that would restart on occasion and fill optional aliases with nearby valid NPCs. But I know there are other possible methods. One script cannot do everything. You will need more than one and you will need to learn how to access one script from another if you want that one singular "master script" that does all data holding and manipulating. Link to comment Share on other sites More sharing options...
Recommended Posts