PDA

View Full Version : Struct Question



warlord57
12-10-2007, 11:47 PM
I am currently working on creating a mutator that will allow for customization of almost everything in the game from weapons damage to player move speed. I want to know if structs can be used as a config variable;

for example can I use (I am not sure if the syntax for structs is correct as I am going out of memory)


struct ThisStruct
{
var int iFirst;
var int iSecond;
};
var config ThisStruct ConfigStruct;


instead of



var config int iFirst;
var config int iSecond;


I am wanting to know if it is possible since there are about 10 weapons and like 10 vehicles and I need an easy way to organize off the variables inside the mutator class.

I do not want to create a long list of variables with long names for each config of the weapon or vehicle if I do not have to.

Thanks in advance.

}DA{Moneyshot
12-10-2007, 11:56 PM
Yes it is possible. I'm saving a dynamic array of structs with config variables in my Allow Player Alias mutator.

warlord57
12-11-2007, 04:26 PM
thanks this will be much easier than over 100 of variables with different names :D