General scripting questions

Started by XnossisX, June 29, 2018, 07:38:39 PM

Previous topic - Next topic

XnossisX

I am new to VVVVVV, so I'm not too good at scripting, and so, I have some questions.
First of all, when I used Ved for internal scripring, I noticed that the text boxes weren't working correctly.
The first text box was, weirdly,
"cutscene()
untilbars()
squeak(terminal)
text(gray,0,114,38)"
Nice speech there, but that doesn't help any.
Then, the correct script plays, until the end, when on the second last line, the whole thing stops. Pressing ACTION doesn't help, either.
When I went into the real VVVVVV editor to see if the compiler had done something wrong, it turns out that for some reason, the whole thing started with "say(38)". I'm not sure what this does, and it might be the cause of the glitch.
Here is the script:
createcrewman(104,96,purple,0,followplayer)
face(cyan,purple)
speak_active
text(purple,200,0,2)
Captain! It's you! And I've found
the ship!
speak_active
text(cyan,300,0,1)
Is there a hospital around here?
changemood(purple,1)
speak_active
text(cyan,300,0,3)
Well, that's incredibly rude of you!
Don't you see the elephant in the
room here?
speak_active
text(cyan,200,0,1)
Yes.
speak_active
text(purple,200,0,1)
We need to find the others!
speak_active
text(purple,200,0,1)
Who knows where they are?
speak_active
text(cyan,300,0,1)
Yes.
speak_active
text(purple,200,0,1)
Can you stop saying yes?
speak_active
text(cyan,300,0,1)
Yes.
speak_active
text(purple,200,0,1)
Whatever, let's go to the ship.
flag(7,on)

Tell me if you know the cause of this glitch.

My second and final (for now) question is what the music is during the "Level Complete!" cutscene. It sounds a lot better than the "You found a crewmate!" cutscene music, and I want to use it. Does anyone know how to get it?

moth 🦋

Quote from: XnossisX on June 29, 2018, 07:38:39 PM
When I went into the real VVVVVV editor to see if the compiler had done something wrong, it turns out that for some reason, the whole thing started with "say(38)". I'm not sure what this does,
because of the way v6 works to load internal script commands an exploit is used
an internal script starts with say(number of lines)
anyway,
after Whatever, let's go to the ship.
i'd put
speak_active
endtext
loadscript(stop)

that'll probably fix it (i think)
Quote from: XnossisX on June 29, 2018, 07:38:39 PM
My second and final (for now) question is what the music is during the "Level Complete!" cutscene. It sounds a lot better than the "You found a crewmate!" cutscene music, and I want to use it. Does anyone know how to get it?
simplified scripting: music(0a)
internal scripting: play(0)
hopefully i helped a little bit but im tired right now
so if theres anything i missed, check this thread: http://distractionware.com/forum/index.php?topic=2458.0

Dav999

Quote from: XnossisX on June 29, 2018, 07:38:39 PM
The first text box was, weirdly,
"cutscene()
untilbars()
squeak(terminal)
text(gray,0,114,38)"
You're seeing that because one of the first lines in the script is a speak_active, that should come after defining text boxes, not before. (speak_active actually displays the text box after it has been defined).

The last text box needs an endtext, like shiny said (you don't actually need to add loadscript(stop), though)

You can also use position(<color>, above) to place the text box above a crewmate of a certain color. (Before speak_active, but after defining the text)

XnossisX

Also, can you rescue a crewmate even if you haven't put down a crewmate not using scripting?

XnossisX

Quote from: Dav999 on June 30, 2018, 12:11:43 AM
Quote from: XnossisX on June 29, 2018, 07:38:39 PM
The first text box was, weirdly,
"cutscene()
untilbars()
squeak(terminal)
text(gray,0,114,38)"
You're seeing that because one of the first lines in the script is a speak_active, that should come after defining text boxes, not before. (speak_active actually displays the text box after it has been defined).

The last text box needs an endtext, like shiny said (you don't actually need to add loadscript(stop), though)

You can also use position(<color>, above) to place the text box above a crewmate of a certain color. (Before speak_active, but after defining the text)
Can you use the position command without needing any extra parameters?

moth 🦋

Quote from: XnossisX on June 30, 2018, 02:20:19 AM
Also, can you rescue a crewmate even if you haven't put down a crewmate not using scripting?
im 99% sure no
Quote from: XnossisX on June 30, 2018, 02:40:49 AM
Can you use the position command without needing any extra parameters?
no
position can be...

center text boxposition(center)
keep texbox's y coordinate but center its x coordinate:position(centerx)
keep texbox's x coordinate but center its y coordinate:position(centery)
display textbox above color:position(color,above)
display textbox below color:position(color,below)

if you want to put in BOTH the x and y coordinates yourself you can't use position :P

XnossisX

Quote from: shiny k on June 30, 2018, 06:31:17 AM
Quote from: XnossisX on June 30, 2018, 02:20:19 AM
Also, can you rescue a crewmate even if you haven't put down a crewmate not using scripting?
im 99% sure no
Quote from: XnossisX on June 30, 2018, 02:40:49 AM
Can you use the position command without needing any extra parameters?
no
position can be...

center text boxposition(center)
keep texbox's y coordinate but center its x coordinate:position(centerx)
keep texbox's x coordinate but center its y coordinate:position(centery)
display textbox above color:position(color,above)
display textbox below color:position(color,below)

if you want to put in BOTH the x and y coordinates yourself you can't use position :P
What I meant by "rescuing a crewmate" was using internal scripting and using the rescued() command.
By the way, I did put the person down, and used the rescued command, but nothing seemed to happen to my crew menu. Can you explain this?

moth 🦋

Quote from: XnossisX on June 30, 2018, 05:52:29 PM
What I meant by "rescuing a crewmate" was using internal scripting and using the rescued() command.
By the way, I did put the person down, and used the rescued command, but nothing seemed to happen to my crew menu. Can you explain this?
rescued() doesnt do anything in custom levels

Xandog01

Quote from: shiny k on June 30, 2018, 06:07:42 PM
Quote from: XnossisX on June 30, 2018, 05:52:29 PM
What I meant by "rescuing a crewmate" was using internal scripting and using the rescued() command.
By the way, I did put the person down, and used the rescued command, but nothing seemed to happen to my crew menu. Can you explain this?
rescued() doesnt do anything in custom levels
It's for Rescuing Crewmates in the real game, because you don't touch them to rescue them in the main game, so it is a "rescued" Command for that instead of touch to rescue, and also, you have to type "rescued(colour)" to rescue them, colour being Cyan, Blue, Red, Yellow, Green, Pink. (Although some people say that violet is purple, but I agree she is pink.

Info Teddy

you can trigger the gamestate that rescues a custom level crewmate but if you want the dialogue box to be automated you'll need to use a delay,1 and then flip