Blockland Forums > General Discussion

Advanced VCE techniques?

Pages: << < (3/3)

tredden:


--- Quote from: King Leo on May 26, 2013, 08:17:41 AM ---Uhm. I'm pretty sure that strings are capped at 200 characters. So the "infinately large" part isn't quite true...

--- End quote ---

Strings do not have caps. The number of characters that can be displayed on a single entry. (255 to be exact)

I have combined 3 of the above mentioned "advanced techniques" to show you about infinite databases.


--- Code: ---0. onActivate Self VCE_modVariable  Brick  num  Add  1
1. onActivate Self VCE_modVariable  Brick  data  Set  <var:br:data> <var:br:num>
2. onActivate Self VCE_modVariable  Brick  check  Set  -1
3. onActivate Self VCE_ifVariable  false  ==  false  4 8
4. onVariableFalse Self VCE_modVariable  Brick  check  Add  1
5. onVariableFalse Self VCE_modVariable  Brick  temp  Set  <var:br:data>
6. onVariableFalse Self VCE_modVariable  Brick  temp  Words  <var:br:check>
7. onVariableFalse  Client  ChatMessage  <var:br:temp>
8. onVariableFalse  Self  VCE_ifVariable  temp   ==   4 8

--- End code ---

If you notice on event line 1, the variable "data" would be set to itself, then would add the variable "number" to the end of it with a space between them. As you can figure out, the database would become increasingly bigger on every click.

Now, I could just display the variable "data" to the client, but as I mentioned, there is a 255 character limit. So instead, i used a variable to loop to display every single item in the database. Heres proof:




ETC. ETC. ETC.




As you can plainly see, there is no character cap for strings. And if you don't believe the pics, use the events from the code, click it a bunch of times, then scroll up your chat.


And as for combining all 4 techniques for the animation studio, i used colorids instead of numbers. Im not going to tell you about one more crucial step for the studio, but i bet someone can figure it based on all this information...

Mysteroo:


--- Quote from: LeetZero on May 26, 2013, 01:51:36 PM ---Item "Key" ifVariable
This is a simple one, this basically makes any item a key. Take note that it can only be used on minigames with painting off. Using the paint changing button with an item in a minigame activates stuff.

--- Code: ---Brick #
onActivate Self VCE_ifVariable <var:pl:currentitem> == [precise item name]

--- End code ---

--- End quote ---
So if I were to use the deflector, what would I put in for the item name? I tried "Deflector" but it isn't working for some reason, and yes I have painting disabled and everything

LeetZero:


--- Quote from: Mysteroo on May 27, 2013, 10:37:24 AM ---So if I were to use the deflector, what would I put in for the item name? I tried "Deflector" but it isn't working for some reason, and yes I have painting disabled and everything

--- End quote ---
Do a chatMesssage with "<var:pl:currentitem>" and see what it says. Include the "s to check for any spaces.

King Leo:


--- Quote from: tredden on May 26, 2013, 06:27:15 PM ---Strings do not have caps. The number of characters that can be displayed on a single entry. (255 to be exact)

--- End quote ---
Hmm... that's very interesting. I didn't know that. The sting contains more than 255 words (bad images in that respect btw, you should've shown one that displays a larger number than 255). If I print the entire "data" string, it will only display the words up to "88", since the total string length up to that point is 255 characters.

Pages: << < (3/3)

Go to full version