VVVVVV Level Editor Tutorial - Part 1: The basics

Started by Terry, July 26, 2011, 04:53:17 PM

Previous topic - Next topic

Terry

Quote from: Buttons on July 28, 2011, 09:15:45 PM
Quick question: in the level editor, it seems that breakable platforms don't block moving ones as they do in Laboratory 2 (Prize for the Reckless, Exhaust Chute). Any particular reason for that?

Yeah - unfortunately, this isn't actually implemented in VVVVVV either, believe it or not - in the two places you see it happen, it's hardcoded in.

Basically, to make it work in the editor, I would have had to recode the way moving platforms work in VVVVVV, which I decided not to do as I didn't want to risk breaking any platform behaviour in for the relauch. At some point in the future I'll fix this, but for now I'm afraid it's just something you can't do :victoria:

jamodawg97

I have a bit of a problem.  I was drawing stuff, switched items, and now I can only draw in single dots.
Also, In the script thing, I cant do this:
say(2) \\ this would be guy one
bla
bla
reply(2) \\ this would be guy two
:)
:(
reply(2) \\ this is SUPPOSED to be guy one, but it shows guy two
..
..

Do I do say(2) again?

ALSOALSO!!!
I try doing the
happy
command, buy he is still sad. 

PS:  This game is awesome!  Thank you HIB!

Terry

Hmm, that's weird - can I see the exact script you wrote?

(You can access it by opening the level file with a text editor, by the way, it's all human readable XML. Scroll down to the bottom for the script!)

jamodawg97

I actually did figure out the script problem, but I didn't figure out the happy part. 
I still do need help though, at the end of my level I have a script, and right before it goes to the last line, the game crashes.
I would give it to you, but it crashed before I got a chance to save.  I will try recreating it. 

This is similar, but has the same problem:
<script>Captain Where are you:|say(2)|Captain! Where are you!|It is cold and scary here...|reply(2)|I just got down here!|I&apos;ll get to you somehow!|FIN:|say(1)|Captain!  I can&apos;t believe you made it!|reply(1)|Yeah, that was short...|say(3)|Well, to be fair, jamodawg97 didn&apos;t|know how to re-scale a map when he|started the level.|reply(2)|True.  You gotta admit he did a |decent job at a first attempt.|say(1) Not really.|</script>

Terry

This bit at the end looks wrong:

|say(1) Not really.|

The "|" character is the separator, so it looks like you wrote all that on one line, which the editor can't handle! (that, or there's a bug, which is very possible). Anyway, it should be "say(1)" on the first line, and "Not really." on the second.

jamodawg97


Terry

Sorry! The VVVVVV scripting editor is pretty buggy right now. It'll get better!

FawFuL

#22
After I heard about the level editor, I decided to buy this game for myself  :viridian:

expect some levels from me soon ^^

Quote from: randomnine on July 28, 2011, 08:10:09 PM
Quote from: Ice on July 28, 2011, 01:29:54 AM
Is there a way to check if a flag is off? It would help me make a script only activate once.

Here's how I'm doing scripts that only activate once.

At the start of the game, trigger a script which sets flag x to "on"

Put a trigger zone for the once-only script, hitting a very simple script called scriptconditional.

scriptconditional:
ifflag(x,script)

Set up the script itself separately.

script:
flag(x,off)
... (all the other script stuff)

The name of "script" has to be lowercase or the jump from ifflag() won't hit it. You also have to do it this way round, as when ifflag() triggers, it puts black borders around the screen which don't disappear until a say() or a reply() - so your script needs at least one of those in, too!


But isn't it more simple to keep you from turning on flags in the beginning? Now, the following example sounds like the easiest and best way to script this to me:

Script1:
ifflag(1,script2)
Say(1)
Hello
Say(1)
I will activate something for you!
destroy(gravitylines)
Say(1)
Here you go!
flag(1,on)

Script2:
Say(1)
Sorry, you used this already.

Now it misses the redirection the first time because script 1 is off, at the end of the script it gets turned on so the next time you read it, you will see script 2. It's also easier to see script1 as main script than script2 I guess.  :viridian:

Also, question.. If you use Iftrinketsless(1,scriptname), shouldn't it go to 'scriptname' if you have 0 or 1 trinket(s)? Iftrinkets(2,scriptname) works if you get 2 trinkets, but Iftrinketsless doesn't seem to work for me.

TheoX

this scripting stuff is a bit confusing.  I understand the say and reply but that's about it. 

I hope someone makes a scripting thread.

Terry

Sorry, I was hoping to get the second tutorial out today, but I've had my hands full with the save converter  :victoria: Will try to catch up tomorrow!

I am Ry

#25
This made me join the forum. c: Messing with it now. Also, hi, everyone!

On topic: Quick question, is there a way to give each room it's own title like in the game?

TheoX

#26
Quote from: Terry on July 29, 2011, 01:55:02 AM
Sorry, I was hoping to get the second tutorial out today, but I've had my hands full with the save converter  :victoria: Will try to catch up tomorrow!

That's OK take your time!  Someone else might make a thread too, who knows.  Some people get good at this sort of thing quickly.

Quote from: I am Ry on July 29, 2011, 02:03:53 AM
This made me join the forum. c: Messing with it now. Also, hi, everyone!

On topic: Quick question, is there a way to give each room it's own title like in the game?

Yeah one of the tools is room name I believe, you just click somewhere and type in a name.  It actually doesn't have to be at the bottom of the screen, it can be anywhere.

EDIT: What I want is to be able to put in my own music and/or enemy sprites.  Or if that's unfeasible, at least have access to more enemies.  That way I can put in cloud puffers :D 

I am Ry

Quote from: TheoXYeah one of the tools is room name I believe, you just click somewhere and type in a name.  It actually doesn't have to be at the bottom of the screen, it can be anywhere.
Is that how it works? I put text in and when I tested, it showed up exactly where I put it in the editor. Also, it allows you to place more than one, so I'm not sure if that works :victoria:

Quote from: TheoX on July 29, 2011, 02:08:23 AMEDIT: What I want is to be able to put in my own music and/or enemy sprites.  Or if that's unfeasible, at least have access to more enemies.  That way I can put in cloud puffers :D 
This!  :vitellary:

Terry

"Room Names" and "Room Text" are slightly different things :) Room text can be placed anywhere, but to get classic VVVVVV style room names, they're a room property in the SHIFT menu. Press Shift+R to change it!

You can change the music in the settings music (press ESC), though not custom music (yet). Also, you can change the enemies by pressing Shift+3! (Custom enemies unfortunately aren't in this version, though.)

I am Ry

Haha, I actually, just found it but thank you!  :)

(I actually rather like the room text idea as well)