| Blockland Forums > General Discussion |
| [RESOURCE] Eventing Variables tutorial. |
| (1/3) > >> |
| Plate:
Introduction I see a lot of people wanting to know how to do things with events that could easily be done with Z0W0's VCE system. So I'm making this tutorial on how to create a money system, and what you can do with it. Cool stuff you need Download Z0W0's VCE here. http://forum.returntoblockland.com/dlm/viewFile.php?id=150 There are also third party add-ons that can be done with VCE: * Boom's HUD Prints - RTB required - With HUD prints you can go into RTB - http://puu.sh/2Yh0B.jpg * Lilboarder32's VCE Extension - lastProjectileBasics of VCE You can do quite a bit with variables, let's look at all the default variables that come with the add-on. --Client. --- Quote ---- Client <var:cl:BRICKCOUNT> - get's your brickcount. - Client <var:cl:bl_ID> - get's your bl_id. - Client <var:cl:name> - Gets your name. - Client <var:cl:kdratio> your kd. - Client <var:cl:clanprefix> your clan's prefix. - Client <var:cl:clanfuffix> Your clan's suffix. - Client <var:cl:score> your score. - Client <var:cl:lastmsg> gets your last message said. --- End quote --- and much more. --Player --- Quote ---- player <var:pl:health> - your players health. - player <var:pl:maxhealth> max health. - player <var:pl:speed> your players speed. - player <var:pl:itemy> - player <var:pl:currentitem> your player's current holding item --- End quote --- . --Global --- Quote ---- Global variables <var:global:date> current date. - Global variables <var:global:brickcount> server's brickcount. - Global variables <var:global:time> military time( i think ). - Global variables <var:global:servername> server's name. - Global variables <var:global:port> server's port. - Global variables <var:global:maxplayercount> the max players that the admins of the server put. - Global variables <var:global:playercount> how many clients are connected. --- End quote --- Alot more of these but I think you get the point. --Slayer's VCE variables via http://blockland.nullable.se/wiki/Slayer#VCE_Variables --- Quote --- <var:cl:lives> Gives the player's remaining lives. <var:cl:kills> <var:cl:deaths> <var:cl:team> Player's team number. <var:cl:teamName> Player's team name. <var:cl:teamNameColored> Player's team name, colored the team color. <var:cl:teamColor> Player's team color. Use in place of a color code like <color:ff00ff> <var:cl:teamScore> <var:cl:teamMembers> Number of players on the team. <var:br:teamName> The team (or teams) in control of the brick. <var:br:teamNameColored> Same as above, but colored team colors. <var:mg:teamScore[1-6]> The team score for team X: <var:mg:teamScore3> <var:mg:teamMembers[1-6]> The number of players on team X: <var:mg:teamMembers2> <var:mg:teamCount> The total number of teams. <var:mg:gamemode> The fName of the gamemode. <var:mg:resetting> Whether the round is resetting. <var:mg:useRounds> <var:mg:useTeams> Whether the gamemode allows teams. <var:mg:lives> The minigame starting lives. <var:mg:points> Number of points to win. <var:mg:time> Total time to win. --- End quote --- Now let's continue to create our own variables. Let's make a system of coins. OnActivate >> Client >> VCE_modVariable [Coins] Add [5] OnActivate >> Client >> ChatMessage [you now have <var:cl:coins> Coins. --- Quote ---Q. What did we just do? A. We just created a variable for clients. Q. What's the difference between client, player, and global, Plate? A. Client is saved to their client(bl_id). Player is just saved to the player, until they leave, global, is for the server. --- End quote --- Now what can we do with that variable I just made? Let's make a system where if we have 10 Coins we can buy a Spear. OnActivate >> Client >> VCE_ifVariable [Coins] >= [10] OnVariableFalse >> Client >> ChatMessage [you do not have enough Coins] OnVariableTrue >> Client >> ChatMessage [You bought a Spear for 10 coins] OnVariableTrue >> Player >> setItem >> [Spear] OnVariableTrue >> Client >> VCE_ModVariable [Coins] Subtract [10] OnVariableTrue >> Client >> ChatMessage [you now have <var:cl:coins> Coins.] --- Quote ---Q. What did we just do now? A. We bought a Spear for 10 coins, we checked if their coins were greater or equal to 10, If they didn't It displayed [You do not have enough coins.], If they did have 10 coins, It said they Bought the Spear for 10 coins, and set the Item Spear, then it took away the 10 Coins, and told them their Coin ammounce. --- End quote --- --- Quote ---Q. Now, Plate, what can we do with the the add-on HUD Prints you linked? A. Here, i'll show you. --- End quote --- Inside your RTB preferences you find a section called HUD prints, you can use that to display variables. BottomPrint: [Health: <var:pl:health> Coins: <var:cl:coins>] --- Quote ---Q. So, I can display variables in the HUD prints selection? A. Yep. --- End quote --- If you have any more questions or would like to learn more, PM me or post here inside the thread about what you would like to know, and I hope this helped. |
| Plate:
Reserving for whatever reason. |
| Legodude77:
You'll probably want to add more to the variable listings like <var:pl:sitting> and <var:pl:jetting>(?) |
| LeetZero:
I would've made a more in-depth tutorial also giving more examples of doing stuff with VCE, but this covers stuff up. You should try adding more "stuff you can do". Perhaps you can include community events? Also, player also has <var:pl:itemy> y being 1-5. Also, worth mentioning that installing Slayer has it's own set of events. http://blockland.nullable.se/wiki/Slayer#VCE_Variables Also, you forgot minigame events. Also, you forgot to mention about functions. |
| Plate:
--- Quote from: LeetZero on May 21, 2013, 04:17:34 PM ---Perhaps you can include community events? --- End quote --- Not sure what you mean, elaborate. Included Slayer's variables. |
| Navigation |
| Message Index |
| Next page |