Author Topic: VCE Variables Help  (Read 997 times)

The VCE add-on has on option to add variables to a player. (through events)

onActivate > Player > VCE_modVariable > (variable here: money) > Add > (amount)

The only way I know how to display it is by using events.

onActivate > Client > CenterPrint > <var:pl:money>

How would I display the amount of 'money' I have through a function such as announce or echo?

I was trying
Code: [Select]
announce(findClientByName("playername").money); but that obviously didn't work.


Try %client.brickGroup.varGroup.getVariable("player", "money", %client.player);

I wouldn't suggest mixing VCE with scripting though. You should just do one or the other.

Try %client.brickGroup.varGroup.getVariable("player", "money", %client.player);

I'd like to know the difference between using that and using %client.player.money.
Is there a reason to not be doing the latter?

I'd like to know the difference between using that and using %client.player.money.
Is there a reason to not be doing the latter?
%client.player.money won't work because VCE doesn't store its variables that way

Nevermind, just tested it - I was almost certain I had been able to do something along the lines of that a year ago.

Try %client.brickGroup.varGroup.getVariable("player", "money", %client.player);

I wouldn't suggest mixing VCE with scripting though. You should just do one or the other.
Yeah, after looking at that I think it would be easier to just make my own events and store variables my own way.

Yeah, after looking at that I think it would be easier to just make my own events and store variables my own way.
it probably isn't easier to do that.

Here's an example of printing money to everyone in the server:

%count = clientGroup.getCount();
for(%i=0;%i<%count;%i++)
{
   %client = clientGroup.getObject(%i);
   %msg = %client.brickGroup.varGroup.getVariable("player", "money", %client.player);
   %client.centerPrint(%msg, 3);
}


creating a whole new way of storing the variables in vce would just be too much work and could make some problems imo
« Last Edit: January 01, 2016, 06:17:12 PM by EcstaticEggplant »