Author Topic: General scripting questions  (Read 922 times)

XnossisX

  • Crewmate
  • *
  • Posts: 6
    • View Profile
General scripting questions
« on: June 29, 2018, 12:38:39 PM »
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?

shiny k

  • Captain
  • *****
  • Posts: 1554
  • Welcome to the MOTHER3 world
    • View Profile
    • my msuic
Re: General scripting questions
« Reply #1 on: June 29, 2018, 02:39:31 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
Code: [Select]
Whatever, let's go to the ship.i'd put
Code: [Select]
speak_active
endtext
loadscript(stop)
that'll probably fix it (i think)
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:
Code: [Select]
music(0a)internal scripting:
Code: [Select]
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

  • Global Moderator
  • Captain
  • *****
  • Posts: 2173
    • View Profile
    • The Open Level Project
Re: General scripting questions
« Reply #2 on: June 29, 2018, 05:11:43 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

  • Crewmate
  • *
  • Posts: 6
    • View Profile
Re: General scripting questions
« Reply #3 on: June 29, 2018, 07:20:19 PM »
Also, can you rescue a crewmate even if you haven't put down a crewmate not using scripting?

XnossisX

  • Crewmate
  • *
  • Posts: 6
    • View Profile
Re: General scripting questions
« Reply #4 on: June 29, 2018, 07:40:49 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?

shiny k

  • Captain
  • *****
  • Posts: 1554
  • Welcome to the MOTHER3 world
    • View Profile
    • my msuic
Re: General scripting questions
« Reply #5 on: June 29, 2018, 11:31:17 PM »
Also, can you rescue a crewmate even if you haven't put down a crewmate not using scripting?
im 99% sure no
Can you use the position command without needing any extra parameters?
no
position can be...

center text box
Code: [Select]
position(center)keep texbox's y coordinate but center its x coordinate:
Code: [Select]
position(centerx)keep texbox's x coordinate but center its y coordinate:
Code: [Select]
position(centery)display textbox above color:
Code: [Select]
position(color,above)display textbox below color:
Code: [Select]
position(color,below)
if you want to put in BOTH the x and y coordinates yourself you can't use position :P

XnossisX

  • Crewmate
  • *
  • Posts: 6
    • View Profile
Re: General scripting questions
« Reply #6 on: June 30, 2018, 10:52:29 AM »
Also, can you rescue a crewmate even if you haven't put down a crewmate not using scripting?
im 99% sure no
Can you use the position command without needing any extra parameters?
no
position can be...

center text box
Code: [Select]
position(center)keep texbox's y coordinate but center its x coordinate:
Code: [Select]
position(centerx)keep texbox's x coordinate but center its y coordinate:
Code: [Select]
position(centery)display textbox above color:
Code: [Select]
position(color,above)display textbox below color:
Code: [Select]
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?

shiny k

  • Captain
  • *****
  • Posts: 1554
  • Welcome to the MOTHER3 world
    • View Profile
    • my msuic
Re: General scripting questions
« Reply #7 on: June 30, 2018, 11:07:42 AM »
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

  • Doctor
  • ***
  • Posts: 84
  • This is my Personal text.
    • View Profile
Re: General scripting questions
« Reply #8 on: July 09, 2018, 05:19:39 AM »
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

  • Captain
  • *****
  • Posts: 254
    • View Profile
Re: General scripting questions
« Reply #9 on: July 20, 2018, 12:09:29 PM »
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