Author Topic: VCE cannot use VCE_ifVariable on a named brick.  (Read 1820 times)

I am working on an event project and I trying to do a VCE_ifVariable when targeting a named brick, but it does not appear to work.  The specific event is a when a the brick is pressed, it targets the brick cs_main and checks if a brick variable "continueMain" on cs_main does not equal 1.  I have confirmed many times that the variable "continueMain"  on that brick does exist and does not equal one, yet it will not trigger the onVariableTrue events.

cs_main events:

Start button events:




You can't use ifVariable on a named brick like that. You'll have to use VCE_ifValue and something like <var:nb:cs_main:continueMain> in the check

The var string looks wrong to me though, maybe it was different

You can't use ifVariable on a named brick like that. You'll have to use VCE_ifValue and something like <var:nb:cs_main:continueMain> in the check

The var string looks wrong to me though, maybe it was different
don't you have to use onBlah | NAMED BRICK | VCE_ifValue | <var:br:var_on_named_brick>? i've never seen [/tt]<var:nb> before.

I'm pretty sure it was <var:nb: to check a variable on a named brick. If you call the event on the other brick, it'll run the onVariableBlah events there.

don't you have to use onBlah | NAMED BRICK | VCE_ifValue | <var:br:var_on_named_brick>? i've never seen [/tt]<var:nb> before.
<var:nb_[NAMED BRICK]> is for a variable that was assigned on another brick
attaching a variable to a brick would cause it to be just for that brick, if you named the brick you set that variable on then if you wanted to do an ifValue on another brick you couldn't just do <var:br:[VARIABLE]>, you'd have to do <var:nb_[NAMED BRICK]:[VARIABLE]>

noedit: All variables you attach to a brick are local variables, pretty sure
you use <var:nb: to access local variables on other bricks, in other words

Using the variable a variable replacer and the ifValue output worked! Thanks for the help guys.