Author Topic: VCE help needed!  (Read 1355 times)

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!

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.

Insteading of using the brick like this
Code: [Select]
[0] onActivate - NAMED_BRICK - vceIfVarible[Whatever][1 3]
[1]onVaribleTrue - doStuffHere [Whatever]

Do THIS

Code: [Select]
[0] onActivate - Self - vceIfValue [<var:nb_name goes here:varible name>] [Whatever Value] [1 3]


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: [Select]
[0] [Onactivate] [Client] [VCE_Modvariable] [Money] [Subtract] [500]
[1] [Onactivate] [Self] [VCE_Modvariable] [Brick] [Money] [Add] [500]

Code: [Select]
[0] [Onactivate] [Self] [VCE_Modvariable] [Brick] [Money] [Subtract] [500]
[1] [Onactivate] [Client] [VCE_Modvariable] [Money] [Add] [500]

That's how you do it.

Thanks for the help guys, I figured it out!