Poponfu
-
Posts
2 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Articles
Docs
Gallery
Posts posted by Poponfu
-
-
Legions does it something like this: There is $Pref::PrefVersion = #. When you need to do something like your case, you add to the updatePrefs function with another check. So in your case where they do not have it yet, you say if $= "", $pref::Video::unavailableTexturePath = then set their $Pref::PrefVersion to 1. Next time you would say if != 2.. change these things, then update their $Pref::PrefVersion to 2

Force update certain $pref for users
in TorqueScript
Posted · Edited by Poponfu
You make a new function like this that gets called somewhere early every startup.
function updatePrefs() { if($Pref::version $= "") { <change some prefs> } $Pref::version = 1 //so now they are 1 and it knows whatever got changed }Next time you need to update some prefs, you add to the same function.
function updatePrefs() { if($Pref::version $= "") { <change some prefs> $Pref::version = 1 } if($Pref::version == 1) { <change some prefs again> } $Pref::version = 2 //so now they are 2 and it knows whatever got changed }