• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Code [Help] Reading values from config

SnZ

Grizzled Veteran
Oct 24, 2012
115
0
Hi,

simple question here. I want to read 3 variables from user (R, G, B) via Config.

It will be better to make something like this:

Code:
R=255
G=1
B=1

or

Code:
COLOR=255,1,1
and with above ^ split/extract these three values?
 
Make a config file for the mutator i.e.
Code:
class YourClass extend YourClass config(ConfigFileName);
Make a configurable variable i.e.
Code:
var() globalconfig int  RedColour, BlueColour, GreenColour;
Set the numbers in the default properties. If you want to access the R,G,B, just use the var names instead or force the RBG to use your vars. This was quickly made up and may need to be slightly altered though.

Hope it helps :)
 
Upvote 0