Blockland Forums > Help

Checking treasure chests with VCE

Pages: (1/2) > >>

Plastiware:

I was wondering if there was a way to check how many treasure chests a player has found using VCE, and if so what the name of the value is?  I was going to use score to keep track of players' chests, but player persistence doesn't save score if you're running a default mini-game.  Any ideas?

Zeblote:

Put an event like this on every chest:

onActivate Client VCE_modVariable Chests ADD 1
onActivate Self VCE_savevariable Client Chests

Plastiware:


--- Quote from: Zeblote on January 29, 2013, 01:36:53 PM ---Put an event like this on every chest:

onActivate Client VCE_modVariable Chests ADD 1
onActivate Self VCE_savevariable Client Chests

--- End quote ---

But will it be saved by player persistence if a player leaves and rejoins?  Because that's why I was originally going to use score.

pecon98:


--- Code: ---registerSpecialVar(GameConnection,"chestCount","%this.numFoundTreasureChests");

--- End code ---

Throw this into the script of an add-on you have, then you can just use the <var:cl:chestCount> replacer.

Plastiware:


--- Quote from: pecon98 on January 29, 2013, 02:09:39 PM ---
--- Code: ---registerSpecialVar(GameConnection,"chestCount","%this.numFoundTreasureChests");

--- End code ---

Throw this into the script of an add-on you have, then you can just use the <var:cl:chestCount> replacer.

--- End quote ---

Thanks a million!

Pages: (1/2) > >>

Go to full version