Author Topic: VCE_ifVariable doesn't seem to work right  (Read 883 times)

First brick:
onActivate => self => VCE_modVariable => [Player] test [Add] 1
onActivate => client => centerprint => "Your variable is now <var:player:test>"


Second brick:
onActivate => self => VCE_ifVariable => <var:player:test> [>=] 10
onVariableTrue => player => kill
onVariableFalse => player => doemote => alarm



When I click the first brick and it shows that variable is somewhere between 1 and 10, and I click the second brick, I do the alarm emote. Once it gets past 10, nothing different happens. When I change the argument to anything other than not equal to, I do the emote, and if I set it not equal to 10, it kills me, and it doesn't matter what value the variable is at. It seems like it can't figure out how to do these arguments or something.

Am I doing something wrong here? Is there an add-on that may interfere with variables?


1 problem I have is if I leave 1 part of the var un-capitalized. That could be it but I don't know.

1 problem I have is if I leave 1 part of the var un-capitalized. That could be it but I don't know.
Maybe... I was pretty careful to be consistent with that, though..

Use vce_ifvalue for using replacers on the left side of the logic balancer.

Use vce_ifvalue for using replacers on the left side of the logic balancer.
aha, thanks

First brick:
onActivate => self => VCE_modVariable => [Player] test [Add] 1
onActivate => client => centerprint => "Your variable is now <var:player:test>"


Second brick:
onActivate => self => VCE_ifVariable => <var:player:test> [>=] 10
onVariableTrue => player => kill
onVariableFalse => player => doemote => alarm



When I click the first brick and it shows that variable is somewhere between 1 and 10, and I click the second brick, I do the alarm emote. Once it gets past 10, nothing different happens. When I change the argument to anything other than not equal to, I do the emote, and if I set it not equal to 10, it kills me, and it doesn't matter what value the variable is at. It seems like it can't figure out how to do these arguments or something.

Am I doing something wrong here? Is there an add-on that may interfere with variables?
For that first brick part i;''m having the same Problem.

Use vce_ifvalue for using replacers on the left side of the logic balancer.
...OH! :D

So, what is VCE_ifVariable used for..?

...OH! :D

So, what is VCE_ifVariable used for..?
just another way i think, because you can ask the variable of something, or do it through replacers, which i'm not sure is fool proof...

ifVariable = the object you're doing the event on only. onActivate -> Self -> VCE_ifVariable ["Test"] will check the brick's "test" variable, onActivate -> Player -> VCE_ifVariable ["Test"] will check the player's.

ifValue = any object but uses a more complex setup. onActivate -> Self -> VCE_ifValue ["<var:brick:test>"] checks the brick, onActivate -> Self -> VCE_ifValue ["<var:player:test>"] checks the player's.

Ah k, that clears that up for meh. Thanks, Space