jrfk2 Posted November 2, 2016 Author Share Posted November 2, 2016 thanks the light just went on!! I needed a GlobalVariable object defined in CK in the mod to associate to the variable defined to the script .. Link to comment Share on other sites More sharing options...
jrfk2 Posted November 2, 2016 Author Share Posted November 2, 2016 (edited) ok, so have Global object ID CafePostersRan Value 0.0000 (Constant not checked). In my script the property is defined as: GlobalVariable Property CafePostersRan Auto{global variable to know if it ran} In the properties for the script, for CafePostersRan its type GlobalVariable and the Value is the CafePostersRan Global Object above. in the script to try to set the value to non- 0 I have: float modRan = CafePostersRan.GetValue()Debug.notification("modRan value is "+modRan) If (modRan == 0.0) Debug.notification("Cafe Posters installed, do NOT disable while game is running!") CafePostersRan.SetValue(1)EndifDebug.notification("CafePostersRan mod value now is "+CafePostersRan.GetValue()) And the value starts as 0.000 , the notification about "CaféPosters installed" is displayed .. but the SetValue(1) does not seem to take because the last debug says the GetValue() is still 0.000 .. I thought I had all the right things finally ! :/ Edited November 2, 2016 by jrfk2 Link to comment Share on other sites More sharing options...
kinggath Posted November 2, 2016 Share Posted November 2, 2016 Add Const at the end of the global declaration line, the Const is just saying this property will always be this global, it won't prevent you from setting the value of the Global. Link to comment Share on other sites More sharing options...
jrfk2 Posted November 2, 2016 Author Share Posted November 2, 2016 (edited) ahh ok, yeah Const seemed to imply it can't change .. that was the last piece of the puzzle .. all working now .. thanks Folks!! Edited November 2, 2016 by jrfk2 Link to comment Share on other sites More sharing options...
Recommended Posts