Author Topic: BETC  (Read 2395 times)

I am making an online tutorial on the forums for basic, and advanced, events. BETC, read "BET" "C", or betsy, is know as Boom's Event Training Center (Boom is my online user name). It was originally designed to be a building on SS, but sadly the server is down, so until it is up, I will induce live brainstorming here.

On that note, one either state what you wish to be included, or ask how to event something, or two, state how to event something random. (Like explain how the Midi Synth Machine Works.) Right now, I won't list anything until I have a good, and detail way of explaining things. I will try to make a table of contents, so that you guys can put something like, III. A, at the beginning of your reply so that the helpless can just look at the contents, and scroll through looking for the right numeral, and letter. Until then, just ask questions.  Have fun learning!

BETC

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

Version 0.37

===== Table of Contents =====

I. Prints (Not the Print Block)
   A. Print Types
   B. Hex Codes
   C. Changing Font (Text and Size)
   D. Basic "<>" commands
   E. Advanced "<>" commands
   F. Other


II. Buttons
   A. Non JVS Buttons
   B. JVS Buttons


III. Switches
   A. Non JVS Buttons
   B. JVS Buttons
   C. Advanced Switches (VCE)


IV. Doors
   A. Non JVS Doors
   B. JVS Doors


V. Useful
   A. Delays
   B. Relays
   C. Command Explanations
   D. Print Blocks


VI. Tutorials (Like making a pong game.)
   A. Basic Tutorials (No Delays, Relays, Named Bricks, or VCE)
   B. Delays, Relays, and Named Bricks
   C. Mixed Tutorials (Non-VCE)
   D. VCE Tutorials
   E. Advanced Tutorials (Uses all media)
   F. Other Tutorials


VII. VCE
   A. VCE Tutorial
   B. VCE Values
   C. VCE Variables


VIII. Credits
   A. Main Authors
   B. Helpers
   C. Special Thanks


IX. Change Log
   A. Versions 0.01 - 0.29
   B. Versions 0.30 - 0.39

I. ===== Prints =====

--- A. Print Types ---

   Bottom Print - Displays a print near the bottom of the client's screen.

   Center Print - Displays a print in the center of the client's screen.

   Chat Message Print - Displays a print in the Chat Box in the top left part of the client’s screen

   Bottom Print All - Displays a print near the bottom of the clients's screen that are in the mini game
   of the player who activated the event.

   Center Print All - Displays a print in the center of the clients’ screen that are in the mini game of
   the player who activated the event.

   Chat Message Print All - Displays a print in the Chat Box in the top left part of the clients' screen
   that are in the mini game of the player who activated the event.

--- B. Hex Codes ---

   Hex Codes tell Blockland what color you want your text to be. It consist of 6 or 8 letters or numbers
   (Because Blockland normally uses the 6 character RRGGBB format, I will explain that one first.)
   that relate to three colors, red, green, and blue. To fully understand it, it's good to know that these
   colors are the primary colors of light, while red, yellow, and blue, are the primary colors of art.
   To make yellow with light, you mix red and green. Knowing this may
   help resort back to your comfortable set of the art primary's.

   A Hex Code looks like this, "FFA500" this happens to be the Hex Code for Orange. The first two letters,
   "FF" handles the color red. The third and fourth letters, "A5" handle green. The last couple of letters,
   "00" handle blue.

   A Hex Code uses numbers 0-9, and letters A-F*. To determine the color of a Hex Code, you must
   understand it somewhat.

   *-The letter "G" has been seen in very few Hex Codes. The letter "G" as being the value of 16
      is considered a myth. No valid Hex Codes have been seen using the letter "G".

   Here's the technical jargon, it's okay not to get it. First off, you must convert the decimal RGB value
   to a hexadecimal. Converting a decimal RGB value to a hexadecimal value is fairly straightforward. 
   RGB values are usually given in the 0-255 range; if they are in the 0-1 range,
   the values are multiplied by 255 before conversion.
   This number divided by 16 (integer division; ignoring any remainder)
   gives us the first hexadecimal digit (between 0 and F,
   where the letters A to F represent the numbers 10 to 15.).
   The remainder gives us the second hexadecimal digit.
   For instance the RGB value 201 divides into 12 groups of 16,
   thus the first digit is C. A remainder of 9 gives us the hexadecimal number C9.
   This process is repeated for each of the three color values.
   Most modern operating systems have a built-in calculator to perform
   conversions between number bases and this can also
   be done with some hand-held calculators.

   Here's the non technical jargon. (This is completely inaccurate, but helps you understand.)
   Think of the numbers 0-9. Now think of A-F being 10-15. Thus, you have 0-15.
   To make a Hex Code in RRGGBB format, think of 00 being none, and 1515 being full.
   To determine a value, use my method. A single digit number (0-9) controls 0-9. (Easy, right?)
   A single digit in the ones place determines part the ones.
   A single digit in the tens place determines part of the tens.
   A double digit (A-F a.k.a. 10-15) in the ones place determines part of the ones, and part of the tens.
   A double digit in the tens place determines part of the ones, and part of the tens.
   Think of 00 Being, 0000. The first 00 as the tens, and the second 00 as the ones.
   So, 91 = 91, 27=27, 32=32.
   And, A0=100, 0A=010 (10), A5=105, 5A= 500
   Therefore, AA= 1010, FF=1515, AB= 1011

   If all else fails use a Hex Code Chart until you understand it.

   Here is a list of some commonly used Hex Codes:

      Black:   000000
      Blue:   0000FF
      Red:   FF0000
      Green:   00FF00
      White:   FFFFFF
      Dull Green:   008000
      Yellow:   FFFF00
      Purple:   800080
      Orange:   FFA500
      Hot Pink:   EEA2EE
      Gold:   FFD700
      Silver:   C0C0C0
      Light Gray:   A0A0A0
      Gray:   808080
      Dark Gray:   606060
      Pink:   FFC0CB
      Magenta:   FF00FF
      Cyan:   00FFFF

   There are an infinite combination of Hex Codes.
   (Well, really there are 2,176,782,336, but seriously, who cares?)
   Feel free to experiment with Hex Codes, search online for a Hex Code Chart, or use one of the charts
   in the links provided.

   To implement a Hex Code into a text, type "<color:xxxxxx>" before the text that you wish to color.
   The "x"'s take the place of the letters and numbers of Hex Code.
   For example:

      <color:FFFFFF>Hi there.
   
   This would display "Hi there" in a white text.
   Here an example of a multi-colored text:

      <color:FFFFFF>This is a print example by: <color:FFFF00>Boom <color:FFFFFF>.

   This would display "This is a print example by: " in a white text, "Boom" in a yellow text,
   and the "." in white.
   Doing this would make "Boom" stand out. This can be used for color coding things.
   While multi-colored text can look nice, over using it may lead to confusing the reader,
   and a big mess. Be wise with your colors.

   You can experiment with mixing and matching colors on your own.
   Think of it as light, white light is all the colors combined right?
   Therefore, FFFFFF results in white, and 000000 results in pitch black.

   Hex Codes do not work if you type it in the Chat Box,
   but does work if you use a ChatMessage(All) event.

   Color tester (GREAT RESOURCE): http://digitalconsciousness.com/reference/colorcodetest.phtml
   Color Table (Easy to use, Easy to Print) : http://trafficlog.info/WebTutor/bgcolors1536.png
   Color Table : http://www.htmltricks.com/htmlcolortips.htm
   Color Table : http://www.immigration-usa.com/html_colors.html

--- C. Changing Font ---

   To change the type of font, type <font:xxxx:xx> before the string of text that you wish to change.
   In the "<>" code, the first set of variables handles the font type.
   The second set of variables handles the font size.
   Unlike Hex Codes, the font size only supports numbers. These numbers can range between 1 and 99.
   Here is a list of the supported font types:

      Arial
      Apple Bold
      Arial bold italic
      Arial Bold
      Blackadder ITC
      Calibri
      Comic sans
      Comic sans ms
      Comic sans
      Heveltica
      Impact
      Jokerman
      Kristen ITC
      LCD
      Lucida Console
      Lucida Sans Unicode
      Monotype corsiva
      Outlineletters
      Outline
      Palatino Linotype Bold
      Palatino Linotype
      Papyrus
      pusillanimous individualcat
      Size
      SoulMission
      Symbol
      Tahoma
      Times New Roman
      Trebuchet MS
      Unicode
      Veranda
      Verdana Bold
      Webdings
      Wingdings

--- D. Basic "<>" Commands ---

   <color:xxxxxx>   :   Changes the color of the text. (See Hex Codes)
   <br> :   "The Enter Key" Continues the following text below the previous text.
   <font:size:xx> Changes the font size. (Replace "xx" with the number of the desired font size.)

--- E. Advanced "<>" Commands ---

   <bitmap:x/x/x/x/x/x/x/x/x>   :   Displays a bitmap image. Each "x" is the name of a file folder,
                                                 starting in the Blockland folder. The last "x" is the actual file.
   <var:client:name>   :   Display the player who started the print's name.
   <var:client:bl_id>   :   Display the player who started the print's Blockland Identification Number.
   <var:brick:printcount>   :   Displays the print count of a print block.

--- F. Other ---

   Character Limit:
      There is a 255 Character Limit.
      "<>" Commands are included in this count.

II. ===== Buttons ======

--- A. Non JVS Buttons ---

   Non JVS Buttons are one of the most simple things there is.
   A plain old Non JVS Button is just a simple "onActivate" command,
   but I'm going to cut to the chase for something better than ordinary.

   First off, a button does only one thing. If it does more,
   I consider it either a Switch, or a Dynamic Button.
   I'll do a simple size changing button just to show you
   how simple this really is.

   Okay, here's the logic:
      Button - onActivate
      Changes player size - SetPlayerScale

   Wow, not hard, right?

   Here's the easiest code ever:
Code: [Select]
   [X] 0 [ ] onActivate > Player > setPlayerScale > [I---------]
   This simply makes you small.
   Because I prefer taking simple things to the point of confusion,
   I'll add some more things.
Code: [Select]
   [X] 0 [ ] onActivate > Player > setPlayerScale > [I---------]
   [X] 1 [ ] onActivate > Client > centerPrint > [<color:FFFFFF>You clicked the button.]
   [X] 2 [ ] onActivate > Self > setColorFX > Glow
   [X] 3 [100] onActivate > Self > setColorFX > None
   [X] 4 [33] onActivate > Self > playSound > error.wav

   And there you have it! A simple button.

--- B. JVS Buttons ---

   Yet another simple concept. This one is only slightly harder,
   but allows much more things to come of it.

   First off, "onActivate" can be used for doing things, but shouldn't.
   This is because if you do an "onActivate > Self > contentStart > TrustLevel2 > [ ]" event,
   an "onContentStart" would event would only play if the person
   toggling the event had full trust with the creator of the button.
   An "onActivate" event would work no matter what.

   Secondly, pretty much all event that you would need are set up for you already.
   All you need to do is one, add what you want to happen with an "onContentStart"
   beginning, and change the default red prints. You don't have to change the prints,
   but just by putting "<color:FFFFFF>" at the beginning of all of your prints can actually
   make you seem more experienced than others.

   If you don't seem to grasp the concept by now,
   I'll simply convert the old Non-JVS Button example into JVS format.

   Okay, here's the logic:
      JVS Button - onContentStart
      Changes player size - SetPlayerScale

   Still not that hard, right?

   Here the first snippit of code.
Code: [Select]
   [X] 0 [ ] onContentStart > Player > setPlayerScale > [I---------]
   Now, a JVS button already comes with the events needed,
   so you would just add the event above and you would be done,
   but I will continue as if no default events were given.
Code: [Select]
   [X] 0 [ ] onContentStart > Player > setPlayerScale > [I---------]
   [X] 1 [ ] onActivate > Self > contentStart > TrustLevel3 > [ ]
   [X] 2 [ ] onContentStart > Self > contentStop > Unrestricted > [ ]

   Right now, the button works, but we still need sound.
   Remember that if someone is not you (TrustLevel3),
   they can not use this button. If they are not you,
   which they shouldn't be, you would use an "onContentRestricted"
   event so that they know that they can't press it.
Code: [Select]
   [X] 0 [ ] onContentStart > Player > setPlayerScale > [I---------]
   [X] 1 [ ] onActivate > Self > contentStart > TrustLevel3 > [ ]
   [X] 2 [ ] onContentStart > Self > contentStop > Unrestricted > [ ]
   [X] 3 [ ] onContentStart > Self > playSound > [Sound]
   [X] 4 [ ] onContentStop > Self > playSound > [Sound]
   [X] 5 [ ] onContentRestricted > Self > playSound > [Sound]

   Now the button "clicks" and buzzes if a person without Trust Level 3 presses it.
   Now to add some nice little "centerPrint" events.

Code: [Select]
   [X] 0 [ ] onContentStart > Player > setPlayerScale > [I---------]
   [X] 1 [ ] onActivate > Self > contentStart > TrustLevel3 > [ ]
   [X] 2 [ ] onContentStart > Self > contentStop > Unrestricted > [ ]
   [X] 3 [ ] onContentStart > Self > playSound > [Sound]
   [X] 4 [ ] onContentStop > Self > playSound > [Sound]
   [X] 5 [ ] onContentRestricted > Self > playSound > [Sound]
   [X] 6 [ ] onContentStart > Client > centerPrint > [<color:FFFFFF>You pressed the button.]
   [X] 7 [ ] onContentRestricted > Client > centerPrint > [<color:FFFFFF>You are not allowed to use this button.]

   There you have it! A JVS Button that shrinks you.

III.===Switches===

--- A. Non JVS Switches ---

   By Non JVS Switches, I mean any switch that does not use any form of an "onContent" prefix.
   This means that you will create this switch with any random brick.
   Before we get into the code, let me explain it. In a Non JVS Switch,
   you will be using events such as "onActivate", "Named Brick", and "toggleEventEnabled".
   "onActivate" means that the Output of the event occurs when I player decides to click it
   with their mouse.
   A "Named Brick" event is a variable event. Think of the Named Brick as the Variable "X".
   When you name a brick, which is done by "Wrenching" it (Clicking on the brick with the Wrench
   Tool in hand), you may then apply the Output of an event to that brick.
   "toggleEventEnabled" means to toggle an event On and Off.

   Here are the basics. If a brick has a "Switch" on it. When you click the switch,
   something will happen. When you click the switch again, something else will happen.

   Here is what the code looks like in a light that can be switched On and Off.
Code: [Select]
   0 [X] onActivate > Self > toggleEventEnabled [1 2]
   1 [X] onActivate > Self > setLight > PlayerLight
   2 [ ] onActivate > Self > setLight > None

   Here are the events put in English:

   Event 0 toggles events 1 and 2 On and Off.
   If event 1 is On, the brick that the player clicked will light up.
   If event 2 is On, the brick that the player clicked will not light up.

   To make a Non JVS Switch toggle a different brick, replace > Self > with > NamedBrick [Name of the Brick] >
   on events 0, 1, and 2.

   Let's spice things up a bit. Instead of having a light just toggle On and Off,
   let’s throw in some sound effects:
Code: [Select]
   0 [X] onActivate > Self > toggleEventEnabled [1 2 3 4]
   1 [X] onActivate > Self > setLight > PlayerLight
   2 [ ] onActivate > Self > setLight > None
   3 [X] onActivate > Self > playSound > lightOn.wav
   4 [ ] onActivate > Self > playSound > lightOff.wav

   Now it does the same thing, but this time sound effects are in play.
   Still not satisfied? Okay, let's throw in some prints:
Code: [Select]
   0 [X] onActivate > Self > toggleEventEnabled [1 2 3 4 5 6]
   1 [X] onActivate > Self > setLight > PlayerLight
   2 [ ] onActivate > Self > setLight > None
   3 [X] onActivate > Self > playSound > lightOn.wav
   4 [ ] onActivate > Self > playSound > lightOff.wav
   5 [X] onActivate > Client > centerPrint [You turn the light on.]
   6 [ ] onActivate > Client > centerPrint [You turn the light off.]

   Now it toggles a light, plays a sound, and displays a message.
   Still not amused? Okay, let's add some color to the prints:
Code: [Select]
   0 [X] onActivate > Self > toggleEventEnabled [1 2 3 4 5 6]
   1 [X] onActivate > Self > setLight > PlayerLight
   2 [ ] onActivate > Self > setLight > None
   3 [X] onActivate > Self > playSound > lightOn.wav
   4 [ ] onActivate > Self > playSound > lightOff.wav
   5 [X] onActivate > Client > centerPrint [<color:FFFFFF>You turn the light <color:00FF00>ON<color:FFFFFF>.]
   6 [ ] onActivate > Client > centerPrint [<color:FFFFFF>You turn the light <color:FF0000>OFF<color:FFFFFF>.]

   There, now it toggles a light, plays a sound, and displays a message with colors.
   If this doesn't suit you, then tweak the events until you get what you want.

--- B. JVS Switches ---

   Now on to JVS Switches. JVS Switches are almost the same as Non JVS Switches.
   Instead of many "onActivate" events, you will have events like this:
Code: [Select]
   0 [X] onActivate > Self > contentStart > CW > Unrestricted > [ ]
   1 [ ] onActivate > Self > contentStop > CW > Unrestricted > [ ]
   2 [X] onActivate > Self > toggleEventEnabled > [0 1]

   With these events laid down, you can have a JVS Switch that switches,
   but does nothing. On the bright side, you can now just use events like,
   "onContentStart" and "onContentStop".

   Let's apply the Non JVS Switch code to the JVS Switch.

   Here are the old events:
Code: [Select]
   0 [X] onActivate > Self > toggleEventEnabled [1 2 3 4 5 6]
   1 [X] onActivate > Self > setLight > PlayerLight
   2 [ ] onActivate > Self > setLight > None
   3 [X] onActivate > Self > playSound > lightOn.wav
   4 [ ] onActivate > Self > playSound > lightOff.wav
   5 [X] onActivate > Client > centerPrint [<color:FFFFFF>You turn the light <color:00FF00>ON<color:FFFFFF>.]
   6 [ ] onActivate > Client > centerPrint [<color:FFFFFF>You turn the light <color:FF0000>OFF<color:FFFFFF>.]

   Now to tweak it:
Code: [Select]
   0 [X] onActivate > Self > contentStart > CW > Unrestricted > [ ]
   1 [ ] onActivate > Self > contentStop > CW > Unrestricted > [ ]
   2 [X] onActivate > Self > toggleEventEnabled > [0 1]
   3 [X] onActivate > Self > setLight > PlayerLight
   4 [ ] onActivate > Self > setLight > None
   5 [X] onActivate > Self > playSound > lightOn.wav
   6 [ ] onActivate > Self > playSound > lightOff.wav
   7 [X] onActivate > Client > centerPrint [<color:FFFFFF>You turn the light <color:00FF00>ON<color:FFFFFF>.]
   8 [ ] onActivate > Client > centerPrint [<color:FFFFFF>You turn the light <color:FF0000>OFF<color:FFFFFF>.]

   If you didn't notice, we changed the Non JVS toggler,
   to the JVS toggler. It might seem a little longer,
   but it really helps in the long run. In this format,
   you no longer have to keep track of which events are enabled,
   and which need enabling. Instead of having many "onActivate"
   events, you can now just use "onContentStart", and
   "onContentStop" events.

   If you were to test this, you would notice that when you
   press it, the switch lights up, and doesn't turn off.
   This is because we are not done with the events.
   The next step is to change all of the enabled
   "onActivate" events between 3-8 to "onContentStart",
   and the disabled "onActivate" events between 3-8 to
   "onContentStop" and enable them.

   The result will look like this:
Code: [Select]
   0 [X] onActivate > Self > contentStart > CW > Unrestricted > [ ]
   1 [X] onActivate > Self > contentStop > CW > Unrestricted > [ ]
   2 [X] onActivate > Self > toggleEventEnabled > [0 1]
   3 [X] onContentStart > Self > setLight > PlayerLight
   4 [X] onContentStop > Self > setLight > None
   5 [X] onContentStart > Self > playSound > lightOn.wav
   6 [X] onContentStop > Self > playSound > lightOff.wav
   7 [X] onContentStart > Client > centerPrint [<color:FFFFFF>You turn the light <color:00FF00>ON<color:FFFFFF>.]
   8 [X] onContentStop > Client > centerPrint [<color:FFFFFF>You turn the light <color:FF0000>OFF<color:FFFFFF>.]

   Now to solve the last problem. If you were to activate the switch,
   you would notice that the switch lit up instead of a designated brick.

   This is where the "NamedBrick" event comes into play.
   Create a brick that you wish to be your light,
   or use one that you already have.
   Pull out the Wrench Tool, and click on the brick that you wish to be the light.
   Name this brick "Light".

   Now change the JVS Switch's events to this:
Code: [Select]
   0 [X] onActivate > Self > contentStart > CW > Unrestricted > [ ]
   1 [X] onActivate > Self > contentStop > CW > Unrestricted > [ ]
   2 [X] onActivate > Self > toggleEventEnabled > [0 1]
   3 [X] onContentStart > <NAMED BRICK> > Light > setLight > PlayerLight
   4 [X] onContentStop > <NAMED BRICK> > Light > setLight > None
   5 [X] onContentStart > <NAMED BRICK> > Light > playSound > lightOn.wav
   6 [X] onContentStop > <NAMED BRICK> > Light > playSound > lightOff.wav
   7 [X] onContentStart > Client > centerPrint [<color:FFFFFF>You turn the light <color:00FF00>ON<color:FFFFFF>.]
   8 [X] onContentStop > Client > centerPrint [<color:FFFFFF>You turn the light <color:FF0000>OFF<color:FFFFFF>.]

   Now the JVS Switch should work perfectly!
   If you have any questions just post it, and I'll reply back A.S.A.P.

--- C. Advanced Switches ---

   (Coming Soon)

=== IV. Doors ===

--- A. Non JVS Doors ---

   (Coming Soon)

--- B. JVS Doors ---

   (Coming Soon)

=== 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: [Select]
      [ ] [0] [X] onActivate > Self > fireRelay
   To loop a Relay, so that the event is always happening, add this event:
   
Code: [Select]
      [500] [0] [X] onRelay > Self > fireRelay
   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)

=== 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: [Select]
[ ] 0 [0] onRelay > <NAMED BRICK> [next # in combo] > setEventEnabled [0] [X]
   
Code: [Select]
[ ] 0 [0] onRelay > <NAMED BRICK> [next # in combo] > setEventEnabled [0] [X]
   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: [Select]
[ ] 0 [0] onRelay > <NAMED BRICK> [next # in combo] > setEventEnabled [0 1] [X]
   The last block/number in the combo is evented as follows:

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


   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: [Select]
[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]

   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: [Select]
[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

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

   
Code: [Select]
[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]

   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: [Select]
[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] [ ]

   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: [Select]
[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]

   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: [Select]
[X] 0 [0] onActivate > Self > setColorFX > Glow
   [X] 1 [100] onActivate > Self > setColorFX > None
   [X] 2 [33] onActivate > Self > playSound > Beep_EKG.wav

   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: [Select]
[X] 3 [0] onActivate > Self > Mod_Variable > [Client] [password] Multiply [10]
   [X] 4 [5] onActivate > Self > VCE_modVariable > [Client] [password] Add [ ]

   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: [Select]
[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] [ ]

   So, here's the code put together:

   
Code: [Select]
[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] [ ]

   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: [Select]
[X] 0 [0] onActivate > Self > setColorFX > Glow
   [X] 1 [100] onActivate > Self > setColorFX > None
   [X] 2 [33] onActivate > Self > playSound > Beep_Checkout.wav

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

   
Code: [Select]
[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.]

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

   Long story short, add this:

   
Code: [Select]
[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!]

   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)

=== 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)

=== 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

=== IX. Change Log ===

--- A. Versions 0.01 - 0.29 ---

   Version 0.01 - 0.09 (Unknown Dates)

      Construction

   Version 0.10 (Released 8/18/09)

      First recorded date

   Version 0.11 - 0.13 (Approx. 8/18-24/09)

      Construction

   Version 0.14 (Approx. 8/24/09)

      Added VCE in Table of Contents
      Revised Tutorial Section in Table of Contents
      Removed JVS Terms under section II.

   Version 0.15 (August 8/24/09)

      Fixed Errors
      Added Bolds and Italics to labels
      Filled in topics
      Added Credits (Help me out to get in there!)

   Version 0.16 (Somewhere between 8/24/09 and 9/1/09)

      Reached 20,000 Character Limit

   Version 0.17 (9/1/09)

      Split BETC into two posts

   Version 0.18 (9/2/09)

      Added Relay Section
      Added Colors
      Adjusted "BETC" to new forum layout

   Version 0.19 (9/2/09)

      Color coded Table of Contents
      Color coded Scetions and Subsections

   Versions 0.20 - 0.27 (9/2-21/09)

      BETC given its own thread
      Major Revisions

   Version 0.28 (9/21/09)

      Table of Contents Revised
      Event formats have been changed to one style
      Button section has been filled
      Doors section has been changed to match the table of contents
      Yet another spelling check

   Version 0.29 (9/22/09)

      Fixed some code errors

--- B. Versions 0.30 - 0.39 ---

   Version 0.30 (9/22/09)

      Change Log Created
      Filled Log up to Version 0.30

   Version 0.31 (9/22/09)

      Fixed some display errors
      Moved codes for better display
      Fixed code types
      Fixed indention errors

   Version 0.32 (September 24th, 2009)

      Fixed some logging errors
      Filled in most of Section V. C.

   Version 0.33 (9/24/09)

      Shortened Log Dates
      Added VCE Funtions under Section VII
      Added VCE Save/Load under Section VII
      Bolded Version Numbers in Section IX for better review

   Version 0.34 (9/24/09)

      Fixed even more coding errors
      Bolded All subsections within subsections

   Version 0.35 (9/25/09)

      Added First Tutorial!
      Massive Edits of Lego_Addict's Tutorial
      Added "Contents" under Section VI. B.

   Version 0.36 (9/26/09)

      Slight VCE changes
      Fixed vocabulary
      Other minor changes

   Version 0.37 (9/28/09)

      Added a second tutorial
      Updated Credits List

The original BETC can be found on the Scattered Space forums.

Check it out here: http://scatteredspace.com/forum/index.php?topic=346.msg2576

Couple of hints/ideas -
No edit in Help, so coming soon may be difficult.

You may want to include an introduction or something. Something along the lines of "So, you have seen all these cool things happening in Blockland, and you dont know how they are happening? Words like "eventing" or "events" thrown around, and no idea what they are? Or do you want to just improve your general knowledge of eventing, and move onto more complicated designs? If any of these are yes, you have come to the right place!"   
Lol, corny text is corny, but yeah you get the idea.

And for total beginners I didnt read a bit describing like the screen you see, which may be useful - Eg A pic with "Input" "Parameters" "Output" and like explaining what each of these are, and the standard conventions for things under each of these - Input is what triggers the brick, and generally they will be "On....."

Writing a little bit up on the ZoneEvents may help people, as a lot more can be done with them than just Zone Bricks.

Pictures are a nice break from text, you could use a picture to demonstrate things - Eg. A picture to demonstrate the spawnProjectile co-ordinate ideas.


Altogether a really nice guide, and I hope you get the chance to finish it.  I think this will help a lot of people and I hope it does :)

Thanks. :) I'll add some pictures. I plan to add onBotEvents, but I shall learn how to use Zone Events. I'll add another paragraph to explain Input, Output, etc. I like the picture idea. I'll tackle that over winter break.

Also, I might post this else where on the forums due to not being able to change it. The most recent version will always be found on the SS forums.

Hot to event something where you have to click it 10 times and it adds 1 point.

Example: You need 1 iron, you click on that iron 10 times and it adds i iron point


how to do that.