Code: Select all
class Loadout1Butts:CustomInventory{
states{
pickup:
TNT1 A 0{
A_Log(cvar.getcvar("hd_loadout1",player).getstring());
cvar.getcvar("hd_loadout1",player).setstring("butts");
A_Log(cvar.getcvar("hd_loadout1",player).getstring());
}stop;
}
}
class Load20Boobs:CustomInventory{
states{
pickup:
TNT1 A 0{
A_LogInt(cvar.getcvar("hd_load20",player).getint());
cvar.getcvar("hd_load20",player).setint(80085);
A_LogInt(cvar.getcvar("hd_load20",player).getint());
}stop;
}
}
Code: Select all
user string hd_loadout1="";
user int hd_load20=0;
Typing "give Loadout1Butts" the first time will output
Code: Select all
butts
Code: Select all
butts
butts
Typing "give Loadout1Butts" the first time in every new session will output
Code: Select all
butts
Same thing with the integer version, mutatis mutandis.
Also if I give this item and then check the cvar's value from the console, the console will return the original value even though the CVar...Get* function will return the new value.
I have only tried this in Debian, in case this is an issue with where the ini is stored on a given OS.