VVVVVV Level Editor Tutorial - Part 3: Scripting

Started by Terry, June 17, 2014, 04:56:12 PM

Previous topic - Next topic

Terry

So, unfortunately, I never got around to writing that scripting tutorial. However, here's a basic reference that should get you started:

Quote from: increpare on July 27, 2011, 12:41:03 AM
here's some scripting advice pasted from terry's twitter account:

I'll write a proper tutorial later, but here's a super quick guide to scripting in VVVVVV: Place a teminal or scriptbox and type a name...

That name is how you refer to the script. In the editor, you can modify what's in it. Here are a few simple commands:

This is how you make a terminal talk - the number that "say" takes as an argument is the number of lines -


say(2)
A two line script, read
by a terminal


The "reply" command makes Viridian talk:


say(2)
A two line script, read
by a terminal
reply(1)
Ohh, a talking terminal!


You can change expression with the "happy" and "sad" commands

music(songnum) will play a given song (same as the numbers in the menu), delay(frames) will wait for how many ever frames

Now, logic! "flag(1,on)", say, will turn flag number 1 on. "flag(6,off)" turns flag six off. There are 100 flags, or something like that.

"ifflag(5,scriptx)" will jump to the script named "scriptx" if flag 5 is set.

You can also do iftrinkets(t,script) to check that you've collected at least t trinkets! Or you can use iftrinketsless(t,script).

destroy(gravitylines) will get rid of all the gravitylines on a screen, while destroy(warptokens) gets rid of all the warp tokens.

You could totally use that to make gates that are unlocked with trinket keys, incidentally. If you were so inclined.

If anyone here would like to link to more advanced scripting notes or tutorials, feel free to do so in this topic and I'll update this post to include the links!

[edit:] Check out FIQ's Script command index and hints for a more detailed explaination of things!

vitellaryjr

I'm not sure if I should go to internal commands so early, so I'll just say this:

If you use the "say" command, you can make it colored in version 2.1 and 2.2 by typing this:

say(1,yellow)
This is a yellow text box!


If you have a crewmate of the same color in that room, it will appear above the crewmate's head. Like this:

say(2,yellow)
This is a yellow text
box above Vitellary!


For 2.1 and 2.2 users, hope that helped (at least a bit)!

stylzm

Quote from: Vitellary on June 17, 2014, 05:12:35 PM
I'm not sure if I should go to internal commands so early, so I'll just say this:

If you use the "say" command, you can make it colored in version 2.1 and 2.2 by typing this:

say(1,yellow)
This is a yellow text box!


If you have a crewmate of the same color in that room, it will appear above the crewmate's head. Like this:

say(2,yellow)
This is a yellow text
box above Vitellary!


For 2.1 and 2.2 users, hope that helped (at least a bit)!
What?! 2.2 is out?!  0.0

ToasterApocalypse

Quote from: stylzm on June 17, 2014, 06:31:36 PM
Quote from: Vitellary on June 17, 2014, 05:12:35 PM
I'm not sure if I should go to internal commands so early, so I'll just say this:

If you use the "say" command, you can make it colored in version 2.1 and 2.2 by typing this:

say(1,yellow)
This is a yellow text box!


If you have a crewmate of the same color in that room, it will appear above the crewmate's head. Like this:

say(2,yellow)
This is a yellow text
box above Vitellary!


For 2.1 and 2.2 users, hope that helped (at least a bit)!
What?! 2.2 is out?!  0.0

yes but it was mostly just bugfixes and the addition of predestined fate remix

no towers

FIQ

How about Script command index and hints?
It's not really a tutorial, but a full reference to the (simplified) VVVVVV scripting language.

Dav999

Some additions to the quote in the first post:

  • Flag numbers are from 0 to 99, excluding 67 if you want to maintain compatibility with 2.0 and 2.1
  • iftrinketsless() doesn't work properly
  • The amount of lines in text boxes shouldn't exceed 5 for compatibility with 2.0
  • 2.1+ commands like say(lines,color) and making other crewmates happy and sad
:viridian:

caleb

How do I open a level file? I fail everytime.

My Face: :victoria:

SJMistery

a guide to "how heck you use the direct mode" would be nice. not being able to script anything beyond text and maybe a gravitron makes me feel sad  :victoria:

Sendy

To use Direct Mode, just press F10, hold down CTRL and use the cursor keys to select the tile you want to use. Make sure you're in editing mode 1 (platforms) - even if you want to add background tiles. The best thing to do is get the screen looking as close as you want it before going into Direct Mode, because once you do that, you'll have to make every change on your own, and turning off DM, to the best of my memory, will destroy your changes.

onepamop_wl

Quote from: caleb on January 31, 2015, 11:54:21 PM
How do I open a level file? I fail everytime.

My Face: :victoria:

in editor press [ESC], choose LOAD LEVEL, and type name of the level which you saved  :viridian:

Trinket4067

You don't need to. Just press L whilst editing a level - it'll do the same thing

SteveGamer68

#11
Quote from: caleb on January 31, 2015, 11:54:21 PM
How do I open a level file? I fail everytime.

My Face: :victoria:
You need to type the name in the .vvvvvv file,not the level names!

Hope it helps!  :viridian:

DubstVne

 :o VVVVVV level editing wont work now, whenever I place a block, it does not show it. Can you please show me a way of how to fix this?  :'(

weee50

If you're new to this forum (you probably are because you have only 3 posts), the VVVVVV Help forum would probably be a better place to put your VVVVVV problems, not a topic that hasn't been posted in in over a year.

But anyway, have you tried right clicking? This could be the bug where, if you control-click, you'll be stuck in right-click mode until you right click.

If that doesn't work, you could be in Direct Mode. Try pressing F10 (or Fn+F10 if you're on Mac), and see if that helps.

DubstVne

Quote from: weee50 on November 07, 2017, 12:31:23 AM
If you're new to this forum (you probably are because you have only 3 posts), the VVVVVV Help forum would probably be a better place to put your VVVVVV problems, not a topic that hasn't been posted in in over a year.

But anyway, have you tried right clicking? This could be the bug where, if you control-click, you'll be stuck in right-click mode until you right click.

If that doesn't work, you could be in Direct Mode. Try pressing F10 (or Fn+F10 if you're on Mac), and see if that helps.

Thanks it works now :)