Jump to content

noob question: how to set a value via script that will be saved in the game


jrfk2

Recommended Posts

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)

Endif
Debug.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 by jrfk2
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...