Search Archive

registermodel variables

By GTIMatt · Mar 31, 2009in Hacks/Mods💬 4 posts👁️ 685 views
Posted Mar 31, 2009 · 13:39 UTC#1

I've created a new setting that is stored in a new variable. I have declared the variable like so:

 

 

This all seems to work as I set the new setting in a setup screen and seems to stay set after a reboot. My next step is I want to use this variable to control whether something is displayed or not. I looked at vFullScreenCockpit as an example and it seemed to be used as ui.vFullScreenCockpit in the visiblemodel clause.

 

I tired this with my variable i.e. ui.var_name in navigatemap_800_480 but it just hung on bootup. Should I be able to do this as I have declared my variable with the registermodel option? If so do I reference it with the ui. in front?

 

Anyone know?

Posted Mar 31, 2009 · 13:44 UTC#2
I've created a new setting that is stored in a new variable. I have declared the variable like so:

 

 

This all seems to work as I set the new setting in a setup screen and seems to stay set after a reboot. My next step is I want to use this variable to control whether something is displayed or not. I looked at vFullScreenCockpit as an example and it seemed to be used as ui.vFullScreenCockpit in the visiblemodel clause.

 

I tired this with my variable i.e. ui.var_name in navigatemap_800_480 but it just hung on bootup. Should I be able to do this as I have declared my variable with the registermodel option? If so do I reference it with the ui. in front?

 

Anyone know?

 

Off the top of my head, I've never seen things declared as both models and permanent at the same time (really it wouldn't quite make sense because models are something that changes often enough and is being tracked dynamically)....

 

Will it work if you do one or the other?

Posted Mar 31, 2009 · 13:53 UTC#3
I've created a new setting that is stored in a new variable. I have declared the variable like so:

 

 

This all seems to work as I set the new setting in a setup screen and seems to stay set after a reboot. My next step is I want to use this variable to control whether something is displayed or not. I looked at vFullScreenCockpit as an example and it seemed to be used as ui.vFullScreenCockpit in the visiblemodel clause.

 

I tired this with my variable i.e. ui.var_name in navigatemap_800_480 but it just hung on bootup. Should I be able to do this as I have declared my variable with the registermodel option? If so do I reference it with the ui. in front?

 

Anyone know?

 

Off the top of my head, I've never seen things declared as both models and permanent at the same time (really it wouldn't quite make sense because models are something that changes often enough and is being tracked dynamically)....

 

Will it work if you do one or the other?

 

Well, it definitely needs to be permanent as it's a setting that I want to keep once the unit is off. I will try just the permanent. Should I be able to use the variable in a visiblemodel clause as I have never seen that done all variables seem to have ui. in front of them when used like that.

 

I used both because I had seen it in the speedcam warning mods in model_variables and thought I needed the registermodel to use it in the visiblemodel clause.

Posted Mar 31, 2009 · 16:03 UTC#4
Well, it definitely needs to be permanent as it's a setting that I want to keep once the unit is off. I will try just the permanent. Should I be able to use the variable in a visiblemodel clause as I have never seen that done all variables seem to have ui. in front of them when used like that.

 

I used both because I had seen it in the speedcam warning mods in model_variables and thought I needed the registermodel to use it in the visiblemodel clause.

 

I think just permanent should work then...