went looking through VCE
// Introduced in v5, variables are now stored in brick groups.
// Basically if you are working with variables, all variables that you modify will only exist in your brickgroup, so now one else can modify them.
lol that's weird
I think v4 variables stored it directly
edit: found the variable
it's <client>.processingBrick.getGroup().varGroup.valueClient_<clientID>_<variable name>
just it's not quite as easy to put into the slot machine preference variable as I had hoped
edit: was looking through the slot machine code
registerOutputEvent("fxDTSBrick","slotMachine","list pullLever 0 setPowered 1" TAB "string 200 72",1);
$Swol_SlotMachinePoweredWords["enabled"] = " enable enabled yes on power powered 1 true affirmative ";
$Swol_SlotMachinePoweredWords["disabled"] = " disabled no off false 0 unpowered negative ";
$Swol_SlotMachinePoweredWords["toggled"] = " toggle toggled switch -1 biloveual ";
lol@phrases
function fxDtsBrick::setColorFx(%br,%fx)
{
if(%br.isSlotMachine)
if(%fx == 5)
return; //Looks like stuff
parent::setColorFx(%br,%fx);
}
function fxDtsBrick::setShapeFx(%br,%fx)
{
if(%br.isSlotMachine)
if(%fx > 0)
return; //No
parent::setShapeFx(%br,%fx);
}
and very against people having fun with paint cans
but onward to the important bits
function gameConnection::slot_getVariable(%pl)
{
%vname = $Pref::Swol_SlotMachine::PlayerVariable;
%str = getSubStr(%vname,0,1);
%ret = getSubStr(%vname,1,strlen(%vname));
switch$(%str)
{
case "a": return %pl.a[%ret];
case "b": return %pl.b[%ret];
case "c": return %pl.c[%ret];
case "d": return %pl.d[%ret];
case "e": return %pl.e[%ret];
case "f": return %pl.f[%ret];
case "g": return %pl.g[%ret];
case "h": return %pl.h[%ret];
case "i": return %pl.i[%ret];
case "j": return %pl.j[%ret];
case "k": return %pl.k[%ret];
case "l": return %pl.l[%ret];
case "m": return %pl.m[%ret];
case "n": return %pl.n[%ret];
case "o": return %pl.o[%ret];
case "p": return %pl.p[%ret];
case "q": return %pl.q[%ret];
case "r": return %pl.r[%ret];
case "s": return %pl.s[%ret];
case "t": return %pl.t[%ret];
case "u": return %pl.u[%ret];
case "v": return %pl.v[%ret];
case "w": return %pl.w[%ret];
case "x": return %pl.x[%ret];
case "y": return %pl.y[%ret];
case "z": return %pl.z[%ret];
case "_": return %pl._[%ret];
}
}
function gameConnection::slot_setVariable(%pl,%amt)
{
%vname = $Pref::Swol_SlotMachine::PlayerVariable;
%str = getSubStr(%vname,0,1);
%ret = getSubStr(%vname,1,strlen(%vname));
switch$(%str)
{
case "a": return %pl.a[%ret] = %amt;
case "b": return %pl.b[%ret] = %amt;
case "c": return %pl.c[%ret] = %amt;
case "d": return %pl.d[%ret] = %amt;
case "e": return %pl.e[%ret] = %amt;
case "f": return %pl.f[%ret] = %amt;
case "g": return %pl.g[%ret] = %amt;
case "h": return %pl.h[%ret] = %amt;
case "i": return %pl.i[%ret] = %amt;
case "j": return %pl.j[%ret] = %amt;
case "k": return %pl.k[%ret] = %amt;
case "l": return %pl.l[%ret] = %amt;
case "m": return %pl.m[%ret] = %amt;
case "n": return %pl.n[%ret] = %amt;
case "o": return %pl.o[%ret] = %amt;
case "p": return %pl.p[%ret] = %amt;
case "q": return %pl.q[%ret] = %amt;
case "r": return %pl.r[%ret] = %amt;
case "s": return %pl.s[%ret] = %amt;
case "t": return %pl.t[%ret] = %amt;
case "u": return %pl.u[%ret] = %amt;
case "v": return %pl.v[%ret] = %amt;
case "w": return %pl.w[%ret] = %amt;
case "x": return %pl.x[%ret] = %amt;
case "y": return %pl.y[%ret] = %amt;
case "z": return %pl.z[%ret] = %amt;
case "_": return %pl._[%ret] = %amt;
}
}
probably easiest way is to overwrite these functions
so put
function gameConnection::slot_getVariable(%client)
{
return %client.processingBrick.getGroup().varGroup.valueClient_[%client @ "_<variable name>"];
}
function gameConnection::slot_setVariable(%client, %amt)
{
%client.processingBrick.getGroup().varGroup.valueClient_[%client @ "_<variable name>"] = %amt;
}
in the console, replacing <variable name> with your variable name
(ie, for testing I was using ducknugget as my variable name, so [%client @ "_ducknugget"] for the whole square bracket section)
... except these won't fit in the console
so probably just edit the file directly