Blockland Forums > Help
BETC
<< < (2/3) > >>
Deathwishez:
=== IV. Doors ===

--- A. Non JVS Doors ---

   (Coming Soon)

--- B. JVS Doors ---

   (Coming Soon)
Deathwishez:
=== V. Useful ===

--- A. Delays ---

   Delays are one of the simplest concepts to grasp.
   Delays are at the beginning of an event.
   Delays do what delays do, delay. (Simple, huh.)
   They are measured in milliseconds (ms).
   1,000 milliseconds are in one second.
   The maximum delay on one event is 30,000 milliseconds, or 30 seconds.

--- B. Relays ---

   Relays are very helpful.
   Relays are events start with an "onRelay" command.
   To fire a relay, a "fireRelay(xx)" command is required.
   Here are the expliantions of the "fireRelays":

      fireRelay - Fires a Relay to the selected object
      fireRelayUp - Fires a Relay to all bricks that are directly above the brick
      fireRelayDown - Fires a Relay to all bricks that are directly below the brick
      fireRelayNorth - Fires a Relay to all bricks that are directly North of the brick
      fireRelayEast - Fires a Relay to all bricks that are directly East of the brick
      fireRelaySouth - Fires a Relay to all bricks that are directly South of the brick
      fireRelayWest - Fires a Relay to all bricks that are directly West of the brick

   Think of an "onRelay" event as an "onActivate" event,
   but instead of a player triggering an event, an event triggers an event.

   To allow a player to fire a Relay, set up an event that has this:
   
--- Code: ---      [ ] [0] [X] onActivate > Self > fireRelay
--- End code ---

   To loop a Relay, so that the event is always happening, add this event:
   
--- Code: ---      [500] [0] [X] onRelay > Self > fireRelay
--- End code ---

   Notice that I added a 500 ms Delay.
   I did this because having too many Relay events can cancel events.
   The high the time in the loop, the better.
   Also, try not have too many loops.
   To end a loop, either toggle off the loop event,
   or use a "cancelEvents" event to cease all Relays at once,
   stopping the loop.

--- C. Command Explanations ---

   --- Input Events ---

      onActivate: Plays the remander of the event line if the object is clicked by a player
      onBlownUp:
      onBotTouch: Plays the remander of the event line if a Bot is touching the brick
      onPlayerTouch: Plays the remainder of the event line if a player is touching the brick
      onPrintCountOverFlow: Plays the remainder of the event line if the Print Count count
         of the brick goes over nine
      onProjectileHit: Plays the remainder of the event line if a projectile hits the brick
      onRelay: Plays the remainder of the event line if a Relay is fired on the brick
      onRespawn: Plays the remainder of the event line when the brick respawns
      onToolBreak: Plays the remainder of the event line when the brick is killed by a tool
      onVariableFalse: Plays the remainder of the event line if the variable/value statement is false
      onVariableFunction: Plays the remainder of the event line if the function is called
      onVariableTrue: Plays the remainder of the event line if the variable/value stamement is true

   --- Targets ---

      Self: Itself; defined as the player or the brick.
      Bot: The Bot
      Driver: The Driver of the Bot/Vehicle
      Player: The Player
      Client: The Client
      MiniGame: The MiniGame that the event was created in
      Vehicle: The Vehicle
      <NAMED BRICK>: A variable that is linked to a brick that you have named

   --- Output Events ---

      cancelEvents: Cancels any on going, or looping events
      decrementPrintCount: Decreases the print count by the number stated
      disappear: Toggles off Collision, Raycasting, and Rendering for a set amount of time
         (-1 means infinity because you cannot re-appear before you dissapear)
      fakeKillBrick: Simulates killing the brick.
      fireRelay: Fires a Relay
      fireRelayDown: Fires a Relay to the adjacent brick below itself
      fireRelayEast: Fires a Relay to the adjacent brick east of itself
      fireRelayNorth: Fires a Relay to the adjacent brick north of itself
      fireRelaySouth: Fires a Relay to the adjacent brick south of itself
      fireRelayU: Fires a Relay to the adjacent brick above itself
      incrementPrintCount: Increases the print count by the number stated
      killBrick: Kills the brick
      playSound: Plays a selected sound
      radiusImpulse: No one knows what this does.
      recoverVehicle: Recovers the Vehicle
      respawn: Respawns the indicated target
      respawnVehicle: Respawns the host brick's vehicle
      setColliding: Sets the target's collision on or off
      setColor: Sets the target's color
      setColorFX: Sets the target's color effect
      setEmitter: Sets the target's emitter
      setEmitterDirection: Sets the target emitter's direction
      setEventEnabled: Sets the designated event numbers of the target on or off
      setItem: Sets the item of the target
      setItemDirection: Sets the item's direction of the target
      setItemPosition: Sets the postion of the target's item
      setLight: Sets the light of the target
      setMusic: Sets the music of the target
      setPrintCount: Sets the print count of the target
      setRayCasting: Sets the target's ray casting on or off
      setRendering: Sets the target's rendering on or off
      setShapeFX: Sets the target's shape effect
      setVehicle: Set the Vehicle of the target
      spawnExplosion: Spawns an explosion at the origin point of the target
      spawnItem: Spawns an item at the designated target
      spawnProjectile: Spawns a moving projectile at the designated target,
         with a defined speed in the format of "X Speed, Y Speed, Z Speed, X Off, Y Off, Z Off"
      toggleEventEnabled: Toggles the target's selected events on and off
      VCE_callFuntion: Calls a designated fuction
      VCE_ifValue: Creates a statement to check a value of a designated variable
      VCE_ifVariable: Creates a statement to check a variable against another designated variable
      VCE_loadVariable: Loads a designated variable that has been saved
      VCE_modVariable: Modifies a variable in a designated way by a designated value
      VCE_saveVariable: Saves a designated variable
      VCE_stateFunction: Defines a fuction

--- D. Print Blocks ---

   (Coming Soon)
Deathwishez:
=== VI. Tutorials ===

--- A. Basic Tutorials ---

   (Coming Soon)

--- B. Delays, Relays, and Named Bricks ---

   --- Contents ---

      Password Consoles - Lego_Addict

   --- Password Consoles ---
   By: Lego_Addict
   Revision By: Boom

   This guide is intended for a numbered console with numbers 0-9 on it, as if on a cellphone keypad.
   Also, because of the amount of eventing needed to do this,
   it is only recommended to more advanced eventers.

   First, you need to make the hidden blocks. These are to be placed in a location out-of-sight,
   so a weary wrench doesn't get to them. The number of the hidden blocks is depended on
   how many digits your code will be (I recommend 4).

   The first block should be named whatever the first digit in your code is,
   and the second block should be the second digit in your combo, and so on.
   Once you finish naming the blocks, then you should start eventing.

   The first block/number in the combo has events as follows:

   
--- Code: ---[ ] 0 [0] onRelay > <NAMED BRICK> [next # in combo] > setEventEnabled [0] [X]
--- End code ---

   
--- Code: ---[ ] 0 [0] onRelay > <NAMED BRICK> [next # in combo] > setEventEnabled [0] [X]
--- End code ---

   The above event is repeated if you used more than 4 blocks/numbers in your combo EXCEPT
   for the last two blocks/numbers.

   Second to last is as follows:

   
--- Code: ---[ ] 0 [0] onRelay > <NAMED BRICK> [next # in combo] > setEventEnabled [0 1] [X]
--- End code ---

   The last block/number in the combo is evented as follows:

   
--- Code: ---[ ] 0 [0] onRelay > <NAMED BRICK> [Keep empty] > setEventEnabled [2 3 4] [X]
   [ ] 1 [0] onRelay > <NAMED BRICK> [Keep empty] > setEventEnabled [5 6] [ ]
--- End code ---


   NOTE: The namedbricks in the events of the last block will be filled in at the end of the tutorial.

   The last two blocks/numbers are always needed. So say if you only use 3 numbers in your combo,
   you would not need the second block's/number's events, only use the first block's/number's
   events and use the second to last and last blocks'/numbers' events. If you only used 2
   (not Recommended) Than only use the last two blocks'/numbers' events. Keep in mind,
   the first block's/number's events in the combo are always to be activated, or on.
   So in other words, the events are depended on how many blocks/numbers there are.

   Second, you need make the door that is wanted to be passworded, and name it whatever you choose;
   for the tutorial, I will say "door". You should not remove any events in the door,
   but change the access priviledges for activating and opening the the door to "Admin",
   so admins don't delete your build for not being able to get into your passworded room.

   Next, you should add the following events:

   
--- Code: ---[X] 17 [0]onDoorClose > <NAMED BRICK> [first # block in the combo] > setEventEnabled [0] [X]
   [X] 18 [0] onDoorClose > <NAMED BRICK> [the other # blocks including the second to last] > setEventEnabled [0] [ ]
   [X] 19 [0] onDoorClose > <NAMED BRICK> [last # in the combo] > setEventEnabled [0 1] [ ]
   [X] 20 [0] onDoorClose > <NAMED BRICK> [Keep empty] > setEventEnabled [2 3 4] [ ]
   [X] 21 [0] onDoorClose > <NAMED BRICK> [Keep empty] > setEventEnabled [5 6] [X]
--- End code ---

   NOTE: These are the added events if you DID NOT download the the JVS content.
   If you did, replace the input event "onDoorClose" with "onContentStop".

   Lastly, you need to event the password console.
   First thing you need to do with the password console is make the blocks that will function as the numbers

   NOTE: These do NOT need to be printable 1x1's, nor do they need to be named.
   Naming the blocks would only make it more confusing.

   Make the blocks functioning as numbers in the order as on a phone keypad,
   so input of the code would be easier. Event each of the blocks that will act
   as the digits in the combo as such:

   
--- Code: ---[X] 0 [0] onActivate > Self > setColorFX [Glow]
   [X] 1 [150] onActivate > Self > setColorFX [NONE]
   [X] 2 [0] onActivate > Self > playSound [Beep_Checkout.wav]
   [X] 3 [0] onActivate > <NAMED BRICK> [corresponding block in combo] > fireRelay
--- End code ---

   Make each of the blocks that don't have a corresponding number in the combo as such...

   
--- Code: ---[X] 0 [0] onActivate > Self > setColorFX [Glow]
   [X] 1 [150] onActivate > Self > setColorFX [NONE]
   [X] 2 [0] onActivate > Self > playSound [Beep_Checkout.wav]
   [X] 3 [0] onActivate > <NAMED BRICK> [first # block in the combo] > setEventEnabled [0] [ ]
   [X] 4 [0] onActivate > <NAMED BRICK> [the other # blocks including the second to last] > setEventEnabled [0] [ ]
   [X] 5 [0] onActivate > <NAMED BRICK> [Keep empty] > setEventEnabled [2 3 4] [ ]
   [X] 6 [0] onActivate > <NAMED BRICK> [Keep empty] > setEventEnabled [5 6] [X]
--- End code ---

   The "Keep empty" here will be filled in at the end of the tutorial.

   Next, you need to make the button that will clear the digits you put in if you happen to
   make a mistake upon entering your code (this block doesn't need to be named, either):

   
--- Code: ---[X] 0 [0] onActivate > Self > setColorFX [Glow]
   [X] 1 [150] onActivate > Self > setColorFX [NONE]
   [X] 2 [0] onActivate > Self > playSound [Beep_EKG.wav]
   [X] 3 [0] onActivate > <NAMED BRICK> [first # block in the combo] > setEventEnabled [0] [X]
   [X] 4 [0] onActivate > <NAMED BRICK> [the other # blocks including the second to last] > setEventEnabled [0] [ ]
   [X] 5 [0] onActivate > <NAMED BRICK> [last # in the combo] > setEventEnabled [0 1] [ ]
--- End code ---

   Last thing to do with the password console is make a button that will open the door if you
   put in the code correctly. This block DOES need to be named, and for this I will name it "ok".
   Event it as such:

   
--- Code: ---[X] 0 [0] onActivate > Self > setColorFX [Glow]
   [X] 1 [150] onActivate > Self > setColorFX [NONE]
   [ ] 2 [0] onActivate > Self > playSound [Beep_Key.wav]
   [ ] 3 [0] onActivate > <NAMED BRICK> [door] > doorOpen OR contentStart [X]
   [ ] 4 [0] onActivate > Client > bottomPrint [whatever message you want for getting pass correct] [3]
   [X] 5 [0] onActivate > Self > playSound [Beep_No.wav]
   [X] 6 [0] onActivate > Client > bottomPrint [whatever message you want for getting pass wrong] [3]
--- End code ---

   NOTE: This is the namedbrick you have to put into the events at the beginning, the middle,
   and end of the guide that we had to "Keep empty".

   I will explain how this works now. The first thing you do when putting the code in is start
   typing in the code. When you press the first digit in the code on the console,
   it would fire a relay to the first block/number in the combo, and the events of that block
   make it so when the relay is fired, it activates the once deactivated event of the next block.
   If you were to keep putting the code in correctly, it would keep this chain going to the last
   block/number in the combo. If you make the code completely correct, and press the last
   digit in your combo, than it would switch the events activated on the "ok" block, making it
   so when you press the "ok" block, it would open the door. The reason why the door won't
   keep opening when you press the "ok" button after the door closes is because the events
   of the door reverse what events are activated on the button when it closes.
   If you were to put in the code incorrectly, like say you pressed a number not in the code,
   then it would deactivate the hidden blocks and make sure the "ok" button was turned off if
   the person did one-too many numbers. If this were to happen, than the "clear" button would
   reset all the functions of the blocks.

--- C. Mixed Tutorials ---

   (Coming Soon)

--- D. VCE Tutorials ---

   --- Contents ---

      VCE Password Consoles - Boom

   --- VCE Password Consoles ---
   By: Boom

   Here's my version of a passworded console.
   This one takes more of a mathmatical approach.
   I'll be using the newest version of the VCE.
   For those who have the VCE without functions,
   I'll let you know what you can't do.
   Let's get started.

   First off, your setup. You can either have 12 Print Blocks,
   that have labels for each number, or you can have 12 1x1f plates,
   that do not show you a number on the brick.

   Your keypad needs to consist of whole numbers 0-9,
   an accept button (green) and a reset button (red).

   Now, if you don't know how to use the VCE,
   either one, read Section VII before continuing,
   or two, do exactly as I say.

   Now, here's the basics to make the keypad light up.
   Apply these events to ONLY the numbers buttons:

   
--- Code: ---[X] 0 [0] onActivate > Self > setColorFX > Glow
   [X] 1 [100] onActivate > Self > setColorFX > None
   [X] 2 [33] onActivate > Self > playSound > Beep_EKG.wav
--- End code ---

   Now we have all of the number buttons lighting up,
   but they don't do anything. This is where the VCE comes in.
   Add this:

   
--- Code: ---[X] 3 [0] onActivate > Self > Mod_Variable > [Client] [password] Multiply [10]
   [X] 4 [5] onActivate > Self > VCE_modVariable > [Client] [password] Add [ ]
--- End code ---

   Notice how I kept the Add [ ] blank. This is because you put the number
   of the brick in here. Meaning, the brick that represents 1, gets a "1" in that box.
   2 gets "2", 3 gets "3" etc.

   Now, he's the next part, it can only be done with the newest VCE.
   If you don't have it, you don't need it. This is just some eye-candy. :)
   Add this:

   
--- Code: ---[X] 5 [0] onActivate > Self > VCE_stateFunction > [Display] [6 6]
   [X] 6 [0] onFunction > Client > bottomPrint > [<color:FFFF00>Code<color:FFFFFF>: <var:client:password>]
   [X] 7 [10] onActivate > Self > VCE_callFunction [Display] [ ]
--- End code ---

   So, here's the code put together:

   
--- Code: ---[X] 0 [0] onActivate > Self > setColorFX > Glow
   [X] 1 [100] onActivate > Self > setColorFX > None
   [X] 2 [33] onActivate > Self > playSound > Beep_EKG.wav
   [X] 3 [0] onActivate > Self > Mod_Variable > [Client] [password] Multiply [10]
   [X] 4 [5] onActivate > Self > VCE_modVariable > [Client] [password] Add [ ]
   [X] 5 [0] onActivate > Self > VCE_stateFunction > [Display] [6 6]
   [X] 6 [0] onFunction > Client > bottomPrint > [<color:FFFF00>Code<color:FFFFFF>: <var:client:password>]
   [X] 7 [10] onActivate > Self > VCE_callFunction [Display] [ ]
--- End code ---

   Don't forget to fill in the "Add [ ]" parameter!

   Okay, so you have your key pad. Before we make the check, we need the clear.
   Add this to the red clear button:

   
--- Code: ---[X] 0 [0] onActivate > Self > setColorFX > Glow
   [X] 1 [100] onActivate > Self > setColorFX > None
   [X] 2 [33] onActivate > Self > playSound > Beep_Checkout.wav
--- End code ---

   Now it lights up, but it still needs to have a "Clear" function.
   Add this:

   
--- Code: ---[X] 3 [0] onActivate > Self > VCE_modVariable > [password] Set [0]
   [X] 4 [0] onActivate > Client > bottomPrint > [<color:FFFFFF>You have <color:FF0000>RESET<color:FFFFFF> the code.]
--- End code ---

   Now that that's out of the way, time to move onto the check button.

   Long story short, add this:

   
--- Code: ---[X] 0 [0] onActivate > Self > setColorFX > Glow
   [X] 1 [100] onActivate > Self > setColorFX > None
   [X] 2 [0] onActivate > Client > ifVariable > [password] == [ ] [3 7]
   [X] 3 [33] onVariableTrue > Self > playSound > [Beep_Key.wav]
   [X] 4 [0] onVariableTrue > Client > bottomPrint > [<color:00FF00>Correct!]
   [X] 5 [0] onVariableTrue > <NAMED BRICK> [ ] > contentStart
   [X] 6 [33] onVariableFalse > Self > playSound > [Beep_No.wav]
   [X] 7 [0] onVariableFalse > Client > bottomPrint > [<color:FF0000>Incorrect!]
--- End code ---

   Notice that I left the "<NAMED BRICK> [ ]" section blank.
   This is where the name of your door goes.

   Also, if you choose not to have a JVS Door,
   instead of using "contentStart" on Event 5,
   use "dissappear [3]".

   Another thing I left blank, "[password] == [ ] [3 7]"
   put in the number you wish to be your password.
   (Recommended less than 6)

   If you have any questions, post them in the Comments thread,
   or just PM me.

--- E. Advanced Tutorials ---

   (Coming Soon)

--- F. Other Tutorials ---

   (Coming Soon)
Deathwishez:
=== VII. VCE ===

--- A. VCE Tutorial ---

   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 "[ ] 0 [X] (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

   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.

   Known VCE Bug:

      You cannot fire a relay to another brick with onRelay (VCE). It will not work for unknown reasons.
      "self >>> fireRelay" works just fine.

--- B. VCE Values ---

   In the VCE, a Value is normally a string of text.
   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: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: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

--- C. VCE 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 "MOD Variable",
   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!

--- D. VCE Functions ---

   (Coming Soon)

--- E. VCE Save/Load Variables ---

   (Coming Soon)
Deathwishez:
=== VIII. Credits ===

--- A. Main Authors ---

Written By: Deathwishez (Boom)
Co-Writer: Nasa62 (Mr. Doom)

--- B. Helpers ---

Tutorial Help: Lego_Addict
Tutorial Help: Shappeh
Tutorial Help: Deathwishez (Boom)
Hex Code Help: Nasa62 (Mr.Doom)
Font Type Help: Nasa62 (Mr.Doom)
Review Help: Destiny
Admin Help: GMoney

--- C. Special Thanks ---

[SS] Server Owner: ]KINEX
VCE Creator: Destiny
Being Awesome: Blastdown
Beastly Builder: Gunnaboy
Lego Buddy: Marto
BL Forums:[/li][/list] Badspot
Navigation
Message Index
Next page
Previous page

Go to full version