Ravenmad Posted January 26, 2015 Share Posted January 26, 2015 Hi allI enjoy this game alot and thought i would like to make a MOD for it, so i started with something simple.I found this line in abigail.lua inst.AnimState:SetMultColour(1,1,1,.6) I have changed the numbers and it changed the colour of abigail ghost in game.I have made a MOD that loads in and changes the color if i changed it in the .lua , so i found a way of making a configuation option in the game and have addded Red Green and Blue values that go from 0-255 in the modinfo.luaThe problem i am having is how to make or get the values from the modinfo.lua to the abigail.lua so it will change the color from in the config options in game. i have tried different was and end up with an LUA ERROR everytime. Is it possible to make a new variable to hold the new values ? or is there a command in the game program already that i can use. Thank in advanced for any help Link to comment https://forums.kleientertainment.com/forums/topic/49777-variable-noob-help-plz/ Share on other sites More sharing options...
Blueberrys Posted January 26, 2015 Share Posted January 26, 2015 (edited) @Ravenmad, this tutorial mentions how to use config options."Once you’ve got your configuration data table all set up, you can access the settings by calling GetModConfigData(optionname). The optionname parameter must match the string set as the name of your option in the configuration_options table (i.e. the "name" key, such as "Fish" above). The function will return the saved value of the option if there is one, otherwise it will return the default value you specified in the configuration table." Edited January 26, 2015 by Blueberrys Link to comment https://forums.kleientertainment.com/forums/topic/49777-variable-noob-help-plz/#findComment-606295 Share on other sites More sharing options...
Ravenmad Posted January 26, 2015 Author Share Posted January 26, 2015 Thx Blueberrys I have been learning alot from the forums and was wondering how GetModConfigData(optionname) worked I get blind after awhile looking at stuff and trying to find answers.Thx again. Link to comment https://forums.kleientertainment.com/forums/topic/49777-variable-noob-help-plz/#findComment-606309 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now