Author Topic: VCE Not working  (Read 3052 times)

Hi, when I use any events with VCE nothing works. I KNOW HOW TO USE THEM. Anyway here is an Eg.

OnActivate>self>ifVariable> [ Random = 1 ] [ 1 ]
OnVariableFalse>Client>CenterPrint>O_O IT WORKED!

I click nothing happens.
Does anyone know what add-on is causing this/How to fix?

Thanks

I HAZ FORST POSTE YAYSZ  :cookie: 4 ME !!!!!

(aka: No first post for the noobies)

i don't see it trying to check anything
try this:
input>target>vce_modvariable[variablename][set][0]
input>target>vce_modvariable[variablename[randomnum][maxvalue]
input>target>vce_ifvariable[variablename][check][value][3 4]
onvariabletrue>target>output
onvariablefalse>target>output

and damit, while reading your stupid reply to your topic, it made me drop my tootsie pop :c



drop my tootsie pop :c
Oh sorry D:
Well I know how to do variable replacers but when I try to do <var:cl:score> nothing happens either.

input>self>vce_ifvalue?
did you even read the manuel?

onActivate => self => VCE_ifValue => <var:client:bl_id> [!=]  [ 0 ] [1 2]
onVariableTrue => client => centerPrint [You're not Badspot.]
onVariableFalse => client => centerPrint [You're Badspot!]

input>self>vce_ifvalue?
did you even read the manuel?

lol, I didn't at first and it's impossible to do otherwise

Read the manual, or be doomed

Hi, when I use any events with VCE nothing works. I KNOW HOW TO USE THEM. Anyway here is an Eg.

OnActivate>self>ifVariable> [ Random = 1 ] [ 1 ]
OnVariableFalse>Client>CenterPrint>O_O IT WORKED!

I click nothing happens.
Does anyone know what add-on is causing this/How to fix?

Thanks

When I use ifValue it doesn't work

When I use ifValue it doesn't work

Then you're doing it wrong.

My Manual:

Quote from: BETC

=== VII. VCE ===

--- A. Introduction ---

Welcome to the most advanced form of Wrench Events.
The Variable Conditional Events, or VCE, controls variables,
and allows you to do things that would be nearly impossible with basic events.
Everything covered in this section will be appliable to both VCE Values and VCE Variables.

Let's take a VCE code, and break it apart:
In a VCE code, you have the basic things like "[X] 0
  • (Event)"

You then have two text boxes. Before I explain what they are,
you need to know these math symbols:

      "= =" equals
      "!="does not equal
      ">=" greater than or equal to
      "<=" less than or equal to
      ">" greater than
      "<" less than
      "~=" similiar or equal to

So, here how it works. If this "= =" this, do this [2 4]
The "[2 4]" box means run events 2 through 4.

Events triggered by the VCE will normally be "Variable True/False" events.
Events that are not toggled on will not run.
Events that are not variable true/false arguments will be played no matter what.

--- B. Values ---

In the VCE, a Value is normally a string of text, or a boolean (0 or 1).
Values aren't too hard to grasp, but allow new levels of eventing.

To use Values, you must first know how to set up the "if [this] = = [that]"
The "[this]" part, is what you're comparing "[that]" to.
Let’s introduce the possible "[this]" entrees:

      <var:client:name> : The player's name
      <var:client:bl_id> : The player's Blockland ID.
      <var:client:lastmsg> : The player's last message
      <var:client:lastteammsg> : The player's last team message
      <var:client:score> : The player's score
      <var:client:isAdmin> : If the player is an Admin (Boolean)
      <var:client:isSuperAdmin> : If the player is a Super Admin (Boolean)
      <var:client:clanPrefix> : The player's clan prefix tag
      <var:client:clanSuffix> : The player's clan suffix tag

      <var:player:jetting> : If the player is jetting (Boolean)
      <var:player:jumping> : If the player is jumping (Boolean)
      <var:player:firing> : If the player if firing the mouse (Boolean)
      <var:player:damage> : The amount of damage the player does to another
      <var:player:health> : The player's current health
      <var:player:maxhealh> : The player's maximum health
      <var:player:velx> : The player's velocity on the x-axis
      <var:player:vely> : The player's velocity on the y-axis
      <var:player:velz> : The player's velocity on the z-axis
      <var:player:currentItem> : The UI Name of the current item the player is using
      <var:player:item*> : The UI Name of the *th item in the player's inventory

      <var:brick:colorid> : The brick's color name
      <var:brick:printcount> : The brick's printcount
      <var:brick:colorfxid> : The brick's color effect name
      <var:brick:shapefxid> : The brick's shape effect name

Values cannot be changed, for they are properties,
but they can be displayed in an evented print.

--- C. Variables ---

VCE Variables come in two parts.
One is setting the Variable, and the other is using the Variable.
Variables are numbers that are kept track of, and is given a unit name.
The name is the Variable's Name, and the Value is the Numerical Value of the Variable.

Part 1-Modifing Variables
When you select the event "VCE_modVariable",
You'll see a text box, a math operand (set, add, multiply, etc.), and another text box.
The first text box handles the name of the Variable.
The math operand tells you how you plan on modifying the Variable.
The second text box will always be a digit,
unless you want it as a string, but then,
using operands other than "set" won't work.

Part 2-If Variable Statements
When you select the event "ifVariable"
You'll see a text box, a math symbol (= =, !=, <=, etc.), and another text box.
The first text box states the name of the Variable.
The math symbol tells you what you are comparing the number to.
The second text box will always be a digit.

Example:
Let’s say you have a teleporter, there are two senders, and one receiver.
To make that receiver send to both senders, you need a VCE Variable.
Okay, assuming you know how to set up a teleporter*,
create the events for the two senders, but wait on the receiver.
Once you have set up your teleporters, add a VCE Mod Variable Event.
You may name the Variable anything you want, but in this case,
I'll call it "Sender". Then change the math statement to "set",
then on one teleporter, have "Sender" set to "1", and on another,
have "Sender" set to "2". Now to the receiver.

On the receiver, instead of teleporting the player,
create an "ifVariable" Event. Then have input "Sender = = 1",
meaning if the "Sender" Variable is at the Value of "1",
the statement is true, if it is not 1, like "2", then the
statement is false. Now add the events to teleport the player
to the first teleporter on a "VariableTrue" event, and add the
events to teleport the player on "VariableFalse".

Now try out the teleporter!

*This requires setPlayerTransform

--- D. Functions ---

Variable Functions are a little hard to get at first, but once you get it down,
you will love them.

What is a Variable Function? Think of it as a relay with a name.
Instead on using "fireRelay" you will you "VCE_callFunction".

Easy, right?

Now hold your horses. You can't just call a function out of the blue!
In order to call a function, you must first state that function,
by using "VCE_stateFunction".

Here is an example of a stated function:

Code: [Select]
[X] 0 [0] onActivate > Self > VCE_stateFunction > [Example] [1 1]
[X] 1 [0] onVariableFunction > Player > setPlayerScale > [I---------]

Now you have a stated function!

Now to call that function:

Code: [Select]
[X] 0 [0] onActivate > Self > VCE_stateFunction > [Example] [1 1]
[X] 1 [0] onVariableFunction > Player > setPlayerScale > [I---------]
[X] 2 [0] onActivate > Self > VCE_callFunction > [Example] [ ]

There you have it! This may seem a little simple, and that was because it was just an example.

When would I need functions? When you find yourself in need of using multiple relays,
you normally would have to make another brick for another relay. Well that is no more!

With VCE Functions, you can have up to 17,340 functions on ONE brick!

Lastly, let's look at Event 2 in the example:

Code: [Select]
[X] 2 [0] onActivate > Self > VCE_callFunction > [Example] [ ]

Wondering what that last textbox is for? You can use it to call functions on other bricks!
You do this by typing in the name of that brick.
If the box is left empty, or the brick named does not exist,
then the function is called on itself, and if a called function doesn't exist,
then nothing happens!

This means that on a server, you can have 300,675,600 different functions,
and you can call them ALL with ONE brick!

That my friend, is the power of the VCE.

--- E. Saving/Loading Variables ---

Saving and loading variables is pretty simple.
When you choose the event to save/load a variable,
you will be asked to save/load to or from either the player or the client.

Let me take some time to describe the difference between the player and the client.
The player is the Blockhead himself. Everytime you die,
you get a new Blockhead with full health, and the server/minigame's defualt items.
When you die, all variables on the player are lost.
Meaning it is probably a bad idea to save variables to the player,
unless what you want would require that.

For instance, let's say that you have a button that gives the player a key.
If you die, the key should remain with your body.
Meaning you would loose the key variable if you died.
If you have a long maze with several different keys,
you might add checkpoints for just incase you die.
If you have save points in the maze,
The player can load the key variable from their previous life.

The client, is the actuall connection of the player.
If the player dies, the variable is kept.
If the player logs out, the variable is lost.
A variable that you might want to save to the client could be a currency.
If you have the players obtain gold,
when they died, they would keep their gold amount.
If they logged out, all they would have to do is reload their gold amount!

Now that you know the difference, and their possible uses,
Let's move on to how to type the variables you want saved.
You do not have to save each variable individually.
You can if you want to, but it is not needed.
To save variables, you just simply type the variable name in the box,
and you separate each variable by a comma.

Here are some correct examples:

      [Blocks,Exp,Key1,Key2,Shield]
      [Points, Level, Status, Score]
      [Q1Complete,Q2Complete,Gold,Silver,Bronze]

Here are some incorrect examples:

      [Money, Car,Grown, Int]
      [Data1.Data2,Data3 Data4]
      [Arg1 . Arg 2 . Team]
      [Cash,Spawn, Tools,Color]

Saving and loading works the same way in both text boxes.
Just note that if you use a comma, but no space, then
that style must be continued, and vise-versa with commas
with spaces.

--- F. Using retroCheck ---

VCE_retroCheck was made for the people who prefer the old variables.
Here's a list of the options:

      ifPlayerName : The player's name
      ifPlayerID : The player's ID
      ifAdmin : If the player is an admin
      ifPlayerEnergy : The amount of energy left (refers to the blue bar)
      ifPlayerDamage : The player's health
      ifPlayerScore : The player's score
      ifLastPlayerMsg : The last message the player said
      ifBrickName : The name of the brick
      ifRandomDice : The random number between 1 and 6 (This changes every time the event is called)

VCE_retroCheck works just like any other value, it can't be changed,
but it can't be displayed in an evented print. Some people prefer these
over VCE_ifValue, but I personally like VCE_ifValue, but that's just me.


It's not fully updated, but it goes up to retroCheck

No I am not doing it wrong. I got it to work on a friend's server. It just doesn't work on my server.

Can VCE compare more than one variable in a single brick? like:

IfVariable Gold >= 1000

and

IfVariable DidQuest = 1

Can it check through multiple variables at one time and have different variable false outputs for each var?

Nevermind I figured it out. Locking.