Set something (global variable?) which I can check on read?

Post » Wed Nov 02, 2016 6:59 pm

I am an absolute beginner with Papyrus. I have a little experience with C#, but not much. I've used the CK a little, and the CS before it, but never really touched scripting before now.



What I'm trying to do is to add craft recipes to the game as notes which must be found. So I need some way of checking at the forge whether the player has found whatever note.



In the constructable object settings I can set conditions, and one that looks promising is global. That is what is used to check if the player has Skyforge smithing. Presumably that is set from 0 to 1 at the end of the relevant quest, though I'm not sure how.



I can make a global, and I can make a note with an attached script which runs on read (just displays a message box). I just need to somehow set that global from within that script, and I don't know how. Can anyone help me? Is this even the best way of going about it?



I feel like I'm pretty close to the answer, but just can't find it. I don't really get how references work here either, so that's probably holding me back.



Surely there is something simple for changing a global. SetGlobal or something? Then I would just need a global for each recipe, and set each one when the note is read. Then in crafting, only display the ones where their globals are 1. It's just the setting which I can't do.



Any help at all would be greatly appreciated!

User avatar
Ricky Meehan
 
Posts: 3364
Joined: Wed Jun 27, 2007 5:42 pm

Return to V - Skyrim