Event Script
Bringing Eventing closer to Scripting
Please note, everything and anything is very likely to change. I am open to suggestions.
DescriptionEvent Script is my attempt to drastically increase the capabilities of eventers. VCE brought a whole new skill set to Blockland, however once you got too deep into it, things started breaking apart. Inspired by the usefulness of my Expression event (which I doubt anyone has heard of), I've decided to recreate VCE using a similar structure. Now you will not need 3 lines of events just to get a random number, or 50 lines to make a basic RPG tree with exp and levels, or an entire system to reserve chairs in a theater (that damn thing took hours!)
Planned Features(In order of complexity)
+ Specialized events designed for members used to VCE's style.
+ Similar to ModVariable, IfVariable, etc
+ Multiple operations on one line.
+
(%var * 15) ^ 3.14 + 15 / $pi all on one line
+ Special tags used in centerprints, chat messages, etc similar to VCEs var replacers, but much more versatile.
+ Eg.
<var:cl:name> as your used to
+ Including the ability to code within tags
+ Eg.
<ct:print[(%var * 15) ^ 3.14 + 15 / $pi]> See Code Examples for more info
+ Inline variable operations, conditionals, and loops
+ Eg.
for[%i = 0, %i < 10, %i++] { %i % 2 == 0 ? { print["You are a friend"] } : { print["You suck"] }} + Variable classes (Torquescript doesn't even have this!)
+ Numbers stay as numbers, vectors, arrays, strings, and easy to convert between them.
+ Much closer to real scripting. Learn to script while eventing. Its how I and many others started.
+ Ability to call multiple events on a single line. No compatibility issues.
+ Note that this may have security flaws. I am still currently looking into a secure method.
+ Eg.
$self.setColor[ getRandom[0, 63] ] would call the setColor event on the brick calling the event.
+ Allows for any event to be called, including other add-ons. No issues with parameters not taking variable replacers.
+ Triggered functions, no more VCE relay loops!
+ Method to remove the need of relay loops to check when a player does something.
+ Still working out the details on this one.
+ Will probably be something like
onPlayerJump, or
onPlayerJet. Less abusable than you would think.
Code ExamplesonActivate > EventScript > Eval > %client = $client !%client.gender.isset ? { %client.gender = getRandom[0, 1] }onActivate > Client > CenterPrint > You are a <ct:%client.gender == 1 ? {print["Boy"]} : {print["Girl"]}>.Technical explanation:
%client = $client %client is a local variable stored for the duration of the eval. $client is a global variable that is set to the client that is triggering the event.
!%client.gender.isset Checking if the gender variable is not set (The ! inverts the Boolean)
? { ... } : { ... } If the previous statement is true, execute the code within the { }, otherwise execute the code in the { } after the colon.
%client.gender = getRandom[0, 1] Set the variable 'gender' on the client to be a random integer between (and including) 0 and 1. This variable will be kept on the client and can be accessed in other scripts.
print["Boy"] Replaces the code tag with the contents of the string. Does nothing outside of a codetag. Similar to how VCE variable replacers work.
Variable InfoClasses:
Numbers (Integers and floats)
Eg.
%number = 4 Strings (Letters, words, sentences, that sort of thing)
Eg.
%string = "Hello world!" Booleans (True or false)
Eg/
%bool = $client.hasPlayer Vectors (infinite dimensions)
Eg.
%vector = [5, 2, 10] Technically just an array of numbers.
Objects (Clients, players, other bricks, vehicles, bots...)
Eg.
%player = $player,
%brick = $self Arrays (of each other type, number arrays, vector arrays, etc)
Eg.
%friends = ["Boodals", "Jam Jar", "Blobo", "Elm", "Cant think of friends", "etc", 5.251, ["and even", "multidimensional", "arrays!"] ]Types:
Local variables are variables that are deleted when the code is finished executing.
Eg.
%local = 3.14 Global variables are read only, used to get info from Blockland into Event Script.
Eg.
$player, gets the player who activated the brick (if there is one)
Privacy:
Variables will be able to be set as public or several cases of private.
Private variables will be able to be read by other users, but only modified by your bricks.
Trusted variables will be available to be modified by people with your full trust. This may change depending on a few things.
Whitelist variables will be modifiable by people with certain IDs. Probably will use syntax like
private[3504, other, IDs, here] %var Public variables will be available to be modified by anyone.
Suggestions welcome!I need to know what you guys want to see. I am especially interested in how I can make this more user friendly, as i'm sure this topic alone has scared many uses off. VCE itself was hard to get into if you didn't know where to start. Id like to be able to give this to anyone and have them be able to use it within a couple hours max (obviously not to its full capability, but you get the idea).
Help?I think I could pull this off on my own, however it would take much longer than I have before life gets in the way (uni, exams, etc). If you think you can help me, send me a PM or post here, and we can meet up and chat.