Author Topic: VCE Help  (Read 1273 times)

So recently I started a project using VCE where you can purchase "clothing" (aka colors for different nodes on your blockhead).  It almost works except for one thing.  The ifVariable >= does not seem to work.  When I have it at >= 10 and I have 11 points, it gives me my OnVariableFalse message (Not enough points).  When I flip it around to <= 10 and I have 11, it works; but then it also works when I have less than 10 points which negates the purpose.  Having >= 10 and having less than 10 points also correctly toggles the onvariable false event.

Also, is it possible to show how many more points they need so it says "You need (10 - <var:cl:score>) more points. (<---with that being a number)"

Here is the weird <= 10 thing.

And the final picture. (Wouldnt allow me to post this one and the one before at the same time... 512 kbs)

Also I tried == 10 when I had 10 points and it gave me onVariableFalse, and with a != 10 with 10 points I got onVariableTrue.

You are not using the variable "score" of the client object but instead you are using the variable "<var:cl:score>" of the player object.
Which means you are using <var:player:<var:cl:score>>, which is not the correct way to do it.

If you want to use IfVariable, you only have to fill in "score" when selected the right object (self, player, client).
<var:...> are only used by IfValue (works the same as IfVariable) of the self object or when you need something like: "Your score is: <var:cl:score>" put in chat/centerprint/bottomprint

You are not using the variable "score" of the client object but instead you are using the variable "<var:cl:score>" of the player object.
Which means you are using <var:player:<var:cl:score>>, which is not the correct way to do it.

If you want to use IfVariable, you only have to fill in "score" when selected the right object (self, player, client).
<var:...> are only used by IfValue (works the same as IfVariable) of the self object or when you need something like: "Your score is: <var:cl:score>" put in chat/centerprint/bottomprint


tl;dr, use on [activate - self - ifValue], it takes in the <var:target:name> inputs, and the others don't.


also, move the two variableTrue's to below your ifValue, or they are out of range and are basically useless.


tl;dr, use on [activate - self - ifValue], it takes in the <var:target:name> inputs, and the others don't.


also, move the two variableTrue's to below your ifValue, or they are out of range and are basically useless.

Also, in your VariableFalse, you cannot do math like that in a chatmsg, you'd have to make a new variable or change how you're saying it, such as "(You do not have enough points (10) for this color. (You have 6)".

Ok. Will any of that fix any of the weird >= <= stuff?

Upon further brown townysis:
== always returns false
!= appears to work
>= always returns false
<= always returns true
Same with > and < as >= and <=
~= always returns false

Use either:

Self >> ifValue "<var:cl:score>" >= "10" ""

Or

Client >> ifVariable "score" >= "10" ""

I think there's also a retro check thing for that, too.

Noedit:

I personally prefer:

Self >> ifValue >> "<tags>" ?= "" ""

Ok. Will any of that fix any of the weird >= <= stuff?
Upon further brown townysis:
== always returns false
!= appears to work
>= always returns false
<= always returns true
Same with > and < as >= and <=
~= always returns false

pretty sure you're comparing the wrong variables to each other, so it seems weird to you
but it's actually working as it should

the variable you're checking against should be defaulted to 0, so you're always comparing 10 to 0s, giving you those results

the variable you're checking against should be defaulted to 0, so you're always comparing 10 to 0s, giving you those results
So I would have to set the variable I'm checking against to 10 in order to compare it correctly?

Or do I use a different variable

you're just checking the wrong variable
do what the others said to fix it, I'm just explaining why it's doing what it is
use ifvalue instead of ifvariable and it should work