Jump to content

Recommended Posts

Hi all

I 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.lua

The 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

@Ravenmadthis 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 by Blueberrys

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...