flatline115 Posted April 5, 2015 Share Posted April 5, 2015 I have the Id for the GlobalVariables I want to set in Payprus and no there's no option to do this in the editor given the nature of the script... Any ideas? Link to comment Share on other sites More sharing options...
Mattiewagg Posted April 5, 2015 Share Posted April 5, 2015 You make a property: GlobalVariable Property MyGlobal Auto And somewhere in your Script you can change the value: MyGlobal.SetValue(myValue in decimal form) Be sure to fill your properties: http://skyrimmw.weebly.com/skyrim-modding/how-to-fill-properties-skyrim-modding-tutorial Link to comment Share on other sites More sharing options...
DDProductions83 Posted April 5, 2015 Share Posted April 5, 2015 Giggidy can confirm 1000000000% that it works lolI probably use globals too much imo Link to comment Share on other sites More sharing options...
flatline115 Posted April 5, 2015 Author Share Posted April 5, 2015 Maybe I conveyed this wrong but what I was trying to say was that filling it can not be done the normal way; it must be done within the script. Link to comment Share on other sites More sharing options...
ArronDominion Posted April 5, 2015 Share Posted April 5, 2015 Globals have little write use outside of a script, the main purpose is typically use it across scripts and dialogue as a read variable, occasionally writing to reflect condition changes (i.e. Lights are On, Lights are Off, Lights are on but Generators are off, etc). I do have to say when I was writing a music play control script for Mharphin, I discovered Globals cannot be declared negative, if you are trying to utilize a negative value. Only 0 - 32-bit-max-value work for a Global. Make sure you don't flag the Global as constant also, it will not allow for change if you do. Link to comment Share on other sites More sharing options...
flatline115 Posted April 6, 2015 Author Share Posted April 6, 2015 I know how to use globals.. I just want to set which global I am referring to within the script itself.. Link to comment Share on other sites More sharing options...
ArronDominion Posted April 6, 2015 Share Posted April 6, 2015 (edited) Sorry that wasn't clear. So you declare with a property in the script, and in the properties tab of the script, you can navigate to the particular global you are using. Alternatively if you name the global property in the script with the exact name in the editor window, you can Auto-Fill your property. It is not possible to be dynamic on assigning globals within the script itself, and you must use the built in property tools. Edited April 6, 2015 by Arron Dominion Link to comment Share on other sites More sharing options...
flatline115 Posted April 6, 2015 Author Share Posted April 6, 2015 meh.. I feel cheated. Bethesda needs to step their game up when it comes to variables. Link to comment Share on other sites More sharing options...
ThreeTen Posted April 7, 2015 Share Posted April 7, 2015 Not necessarily true, you can use Game.GetFormFromFile() as GlobalVariable. and set it that way. Its just not the most ideal way to do it. And you can change constant global variables, but it will only stay changed for your current play session. Link to comment Share on other sites More sharing options...
Glanzer Posted June 3, 2021 Share Posted June 3, 2021 Make sure you don't flag the Global as constant also, it will not allow for change if you do.Yeah I know it's an old thread, but I found this thread and it helped. But constant globals CAN be changed in game. But they don't persist between gaming sessions, they revert to whatever their value is in the ESP at each game start. This is great for running something once at the start of each session; just check the variable, and if it's the vanilla value then do something and afterward set it to a nonvanilla value. Link to comment Share on other sites More sharing options...
Recommended Posts