Blockland Forums > Help
VCE help needed!
Pages: (1/1)
percy795:
So basically I am trying to make a brick that can store a variable and I can add a certain amount of a variable to that brick, but I can't seem to be able to extract it from the brick once its there, if anybody knows how to do this I would greatly appreciate the help, thanks!
GenaralSkar:
If you mean to give it to the player or something, you need to subtract the variable from the brick and then add the variable to the player.
Darksaber530:
Insteading of using the brick like this
--- Code: ---[0] onActivate - NAMED_BRICK - vceIfVarible[Whatever][1 3]
[1]onVaribleTrue - doStuffHere [Whatever]
--- End code ---
Do THIS
--- Code: ---[0] onActivate - Self - vceIfValue [<var:nb_name goes here:varible name>] [Whatever Value] [1 3]
--- End code ---
Gen. Hothauser:
This is a bank brick with money stored as a client variable. This is a simplified version of what I use on my CRPG server, except I use client for banked money and player for held money.
For putting money in the bank.
--- Code: ---[0] [Onactivate] [Client] [VCE_Modvariable] [Money] [Subtract] [500]
[1] [Onactivate] [Self] [VCE_Modvariable] [Brick] [Money] [Add] [500]
--- End code ---
--- Code: ---[0] [Onactivate] [Self] [VCE_Modvariable] [Brick] [Money] [Subtract] [500]
[1] [Onactivate] [Client] [VCE_Modvariable] [Money] [Add] [500]
--- End code ---
That's how you do it.
percy795:
Thanks for the help guys, I figured it out!
Pages: (1/1)