What is the best way to do global scripts that are always on?
Like, say I want a script that reacts when the player dings/qualifies for level up, as well as whenever he opens the map? What does such a global script get attached to?
Thanks!
For the former, you don't need a quest that is always on--look into the Story Manager, which can start a quest whenever certain events, like leveling up, occur.
In general, though, the method is that you create a quest with a reference alias set to the player, and add a script to that alias. All of the events that actors trigger will be exposed to your script; you can also use updates to test for certain conditions periodically. Depending on exactly what you want to test for, there are some gaps in Papyrus, and in those cases you can also create a magic effect that is conditioned to apply using condition functions, add it to the player as an ability, and have the magiceffectstart/finish events run whatever code you need.
A question of my own, that I think I know the answer to but just checking to ensure I'm not making a mistake: you cannot use arrays in conditions, can you? That is, in a quest marked conditional I have "Int[] Property iFlags Auto Conditional", yet iFlags is not available in the drop-down menu when I select the GetVMQuestVariable condtion function and my quest. Ideally GetVMQuestVariable would let me choose quest, variable, and (optionally) index--but there's not a built-in way to do this, is there?