Author Topic: Internal Scripting Tutorial [Updated]  (Read 2977 times)

Ally 🌠

  • Captain
  • *****
  • Posts: 1427
  • <3
    • View Profile
    • Ally 🌠
Internal Scripting Tutorial [Updated]
« on: May 05, 2017, 10:58:15 pm »
Alright, so my old one was kinda hard to follow, and kinda cringy.
This won't change.

First, we need to trick the parser with a simplified scripting command, say().
You would use this first:
Code: [Select]
say(-1).Now put an internal command below it.
Code: [Select]
say(-1)
changeplayercolour(green)
Now it turns you green, but there is also a bunch of garbage.
To get rid of it...
Code: [Select]
say(-1)
text(1,0,0,4)
say(4)
changeplayercolour(green)
endcutscene()
untilbars()
loadscript(stop)

If you're confused by that, here:

Code: [Select]
say(-1) #To trick the parser
text(1,0,0,4) #To also trick the parser
say(x) #Number of lines after this.
[Internal] #Internal commands.
endcutscene() #Needed to remove the black bars.
untilbars() #Waits until black bars are gone, not really needed.
loadscript(stop) #The "stop" can be anything, used to remove the garbage normally displayed.
-=Blank line in VVVVVV, this isn't here in Ved.=-
The loadscript(stop) is really the only thing needed at the end.
There should only be one blank line.

Internal scripting is much more advanced, here's simplified to internal:

Code: [Select]
say
It has been 5 years since I last saw them...
say
I really miss them...
say
SIGNAL LOST
sad
delay(30)
reply
Who was that...?
Now lets change that.

Code: [Select]
squeak(terminal)
text(grey,69,420,1)
It has been 5 years since I last saw them...
position(center)
speak_active
squeak(terminal)
text(grey,69,420,1)
I really miss them...
position(center)
speak_active
squeak(terminal)
text(grey,69,420,1)
SIGNAL LOST
position(center)
speak_active

changemood(cyan,1)
squeak(cry)
delay(30)
squeak(cyan)
text(cyan,69,420,1)
Who was that...?
position(player,above)
speak_active

And that is it.

"But wait, there's a terminal sound when the script is activated!"
If you would like it to be removed, it costs two scripts, instead of one.

script1:
Code: [Select]
iftrinkets(0,script2)script2:
Code: [Select]
say(4)
cutscene()
untilbars()
changeplayercolour(green)
endcutscene()
untilbars()
loadscript(stop)
text(1,0,0,4)
-=Exactly one blank line in VVVVVV none in Ved, no more, no less.

"How do I not show cutscene bars?"
"How do I make a background script?"

For only 1 line:
script1:
Code: [Select]
iftrinkets(0,script2)
script2:
Code: [Select]
changeplayercolour(green)
And this is for multiple:

script1:
Code: [Select]
iftrinkets(0,script2)
script2:
Code: [Select]
say(4)
flip
delay(30)
flip
loadscript(stop)
text(1,0,0,4)

Here's what you can do with background scripts:


Finally, an example of what you can do in internal scripting:


And that's all you really need to know.
A list of all internal commands is here: http://tolp2.nl/forum/index.php?topic=21.0
And happy scripting.

DubstVne

  • Doctor
  • ***
  • Posts: 47
    • View Profile
Re: Internal Scripting Tutorial [Updated]
« Reply #1 on: December 02, 2017, 05:19:34 am »
my script:

Code: [Select]
say(-1)
text(1,0,0,4)
say(1)
gotoroom(3,3)
endtext()
endcutscene()
untilbars()
loadscript(stop)
<blank line>
and says garbage then goes on to next script:
Code: [Select]
say(-1)
text(1,0,0,4)
say(1)
gamestate(200)
endtext()
endcutscene()
untilbars()
loadscript(stop)
<blank line>
but that also says garbage code

Ally 🌠

  • Captain
  • *****
  • Posts: 1427
  • <3
    • View Profile
    • Ally 🌠
Re: Internal Scripting Tutorial [Updated]
« Reply #2 on: December 02, 2017, 02:39:20 pm »
the say(1) isnt right
it should be the number of lines that the internal part is

Code: [Select]
say(-1)
text(1,0,0,4)
say(1)
gotoroom(3,3) #1
endtext() #2
endcutscene() #3
untilbars() #4
loadscript(stop) #5
<blank line>

so it should be say(5) in that case

DubstVne

  • Doctor
  • ***
  • Posts: 47
    • View Profile
Re: Internal Scripting Tutorial [Updated]
« Reply #3 on: December 13, 2017, 02:34:37 am »
whenever I use the background internal script, it wont do anything, it will just stop the script.  :victoria:
script1:
Code: [Select]
iftrinkets(0,script2)

...
script2:
Code: [Select]
squeak(terminal)
text(grey,69,420,1)
Im a terminal placed for nothing...
position(center)
speak_active
<blank>

:'(                                  :'(                                      :'(                                    :'(should I do
Code: [Select]
loadscript(stop) after this?
« Last Edit: December 13, 2017, 08:52:52 pm by DubstVne »

Ally 🌠

  • Captain
  • *****
  • Posts: 1427
  • <3
    • View Profile
    • Ally 🌠
Re: Internal Scripting Tutorial [Updated]
« Reply #4 on: December 16, 2017, 05:06:43 pm »
Whoops late reply
This isn't the topic to ask in.