Internal commands

Started by Hilbert, July 28, 2012, 01:23:29 PM

Previous topic - Next topic

Dav999

That's clever, finally a way to check the version! I also wanted to point out workaround 2, but when I was finished writing, you already changed your post. This is what I was going to post:

I think the easiest workaround is to use this:

squeak(off)
say(-1)
text(1,0,0,4)
say(5)
#
[internal]
[internal]
[internal]
text(1,0,0,4)
say(5)
#
[internal]
[internal]
[internal]
text(1,0,0,4)
(et cetera)


You lose one line in the row, but the only reason of wanting four lines in a row would be if you want to use text, and if you want to use internal text, just don't turn it off because you can use that squeaking sound for the dialog!

FIQ

Quote from: Dav999 on August 13, 2012, 11:23:12 PM
That's clever, finally a way to check the version! I also wanted to point out workaround 2, but when I was finished writing, you already changed your post. This is what I was going to post:

I think the easiest workaround is to use this:

squeak(off)
say(-1)
text(1,0,0,4)
say(5)
#
[internal]
[internal]
[internal]
text(1,0,0,4)
say(5)
#
[internal]
[internal]
[internal]
text(1,0,0,4)
(et cetera)


You lose one line in the row, but the only reason of wanting four lines in a row would be if you want to use text, and if you want to use internal text, just don't turn it off because you can use that squeaking sound for the dialog!
Well, there's another reason, and that is that the script will become much longer.

Dav999

You will be able to type that very fast if you do it often, so most of your time will be spent thinking about the thing you want to do, and the commands you're going to need for that.

Dav999

I found another command, telesave(). It saves the game to the regular teleporter save of the actual game, not a quicksave of the level itself. If you load that save, you won't end up in your own level, but in dimension VVVVVV, and most likely you will end up in walls/somewhere you shouldn't be. So it shouldn't be used, actually. (So again, this will destroy your teleporter save). I added it to the list anyway to make it a bit more complete.

blue626

Quote from: Dav999 on July 30, 2012, 12:30:26 AM
Quote from: blue626 on July 29, 2012, 10:25:25 PM
EDIT: Looking at the posts above, where Dav999 and FIQ wrote examples of how to use internal scripting, and reading what Dav999 wrote about the command text, I don't see why do you have to use text(1,0,0,4) sometimes. I also don't see why you'll need say(-1) at the start. Look at the example below, specially, at the 1st line:

text(1,0,0,1)
say(5)
Internal scripting
Internal scripting
Internal scripting
Internal scripting
Internal scripting


Wouldn't it work? If not, would it work if I replaced the 1st line with text(1,0,0,4), or if I wrote say(-1) before the 1st line?

EDIT 2: I know why you need say(-1) now (because the editor would erase the text command if this command wasn't written, am I right?). I still don't know why do you need to use text(1,0,0,4).

I also don't know why there has to be text(1,0,0,4). I can't see the logic of taking 4 lines below it, but yeah. It works. :P

You don't have to use squeak(), position(), speak_active, endtext, endcutscene(), untilbars() and loadscript(stop), if you use the say(-1) trick again for every dialog you want to have coloured:

say(-1)
text(1,0,0,4)
say(5)
text(red,0,0,4)
This can
contain
four
lines!

Will create a red text box in the middle of the screen, and instead of say(), you can also use reply() to make a text box appear above :viridian:

reply(-1)
text(1,0,0,4)
reply(3)
text(yellow,0,0,2)
This box is yellow, but will
appear above the player!

This works because position() and speak_active are already part of the say(5) command or reply(5) command, whichever you use.

And you can just use the remaining space for other internal commands, or to extend it using text(1,0,0,4) say(5). That way, not everything has to be internal code.

I don't understand how to use simplified commands with what you said in this quote. If it is possible, then, there's a way to warp :viridian: to other places with less commands than this:
Quote from: blue626 on August 13, 2012, 06:03:15 PM
Couldn't you just do it with less flashes and commands? Why do you need playef(10) twice? Also, you forgot gotoposition(x,y). Example:

say(-1)
text(1,0,0,4)
say(5)
flash(5)
playef(9)
shake(20)
delay(30)
text(1,0,0,4)
say(4)
playef(10)
hideplayer()
delay(30)
text(1,0,0,4)
say(4)
gotoroom(x,y)
gotoposition(x,y)
delay(30)
text(1,0,0,4)
say(5)
flash(5)
playef(9)
shake(20)
delay(30)
text(1,0,0,4)
say(4)
showplayer()
endcutscene()
untilbars()
loadscript(stop)

It's still long, though. Perhaps, even less flashes and commands?

Perhaps you can use simplified scripting and then use internal scripting, and then use simp. script. again by writing commands that aren't inside a say command. Example:

flash
delay(30)
say(-1)
text(1,0,0,4)

say(3)

playef(10)
hideplayer()
delay(30)

flash
delay(30)
say(-1)
text(1,0,0,4)

say(4)
showplayer()
endcutscene()
untilbars()
loadscript(stop)


The text in bold is int. scripting, while the normal text is simp. scripting. It's STILL long! I don't know why do you need the red lines. If they aren't necessary, you can have less less 3 lines. I still don't know why can't you put say(-3) instead of the orange lines. If you can do that, you can have less 3+4=7 lines.

Dav999

#95
Let's try it out then!

Script:
say(-3)
playef(10)
hideplayer()
delay(30)
flash
delay(30)
say(-1)
text(1,0,0,4)
say
showplayer()


What happens the first time:

warpsound and an empty gray text box, player is not hidden
[waits until you press action]
delay(30), flash, delay(30), gray textbox which says:
Quote from: Textboxposition(center)
speak_active
squeak(terminal)
text(gray,0,114,1)

What happens the second time:

warpsound and a text box which says "position(center)", player is not hidden
[waits until you press action]
delay(30), flash, delay(30), gray textbox which says:
Quote from: Textboxposition(center)
speak_active
squeak(terminal)
text(gray,0,114,1)

So, it does not work. To avoid dialog rubbish you should go to a built-in script which is empty, so we choose a script which doesn't exist and use loadscript(stop). Unless you want to keep the black bars, you need to write endcutscene() to make them disappear and untilbars() to wait until they have disappeared. And not using text(1,0,0,4) and say after that will also make dialog rubbish.

Dav999

Some new commands:

befadein()
changedir(colour,direction)
createactivityzone(colour)
createrescuedcrew()
everybodysad()
trinketyellowcontrol()
trinketbluecontrol()
rollcredits()
teleportscript(levelonecomplete)

I forgot to include these:

musicfadeout()
stopmusic()

These commands turn out to be different than I thought (@FIQ: did you know about this?):

gotoposition(x,y,z) turns out to have an extra argument, the z is whether you end up flipped or not, but you can also use that command with only two arguments
playef(x,n) also turns out to have an extra argument, and I don't know what that argument does (in the real game, it's always 10, but you can also use that command with only one argument)

It looks like there are also some unused commands:

ifwarp(x) ?
clearteleportscript(x) ?

The list has been updated!

FIQ

Quote from: Dav999 on August 14, 2012, 06:14:39 PM
Some new commands:

befadein()
changedir(colour,direction)
createactivityzone(colour)
createrescuedcrew()
everybodysad()
trinketyellowcontrol()
trinketbluecontrol()
rollcredits()
teleportscript(levelonecomplete)

I forgot to include these:

musicfadeout()
stopmusic()

These commands turn out to be different than I thought (@FIQ: did you know about this?):

gotoposition(x,y,z) turns out to have an extra argument, the z is whether you end up flipped or not, but you can also use that command with only two arguments
playef(x,n) also turns out to have an extra argument, and I don't know what that argument does (in the real game, it's always 10, but you can also use that command with only one argument)

It looks like there are also some unused commands:

ifwarp(x) ?
clearteleportscript(x) ?

The list has been updated!
befadein() - Instantly fades in
changedir(colour,left|right) - Changes what direction a crewmate is facing
createactivityzone(colour) - Create a "Press ACTION to talk to (Crewmate)" zone, flags will decide which line is used
createrescuedcrew() - Creates all the crewmates that's rescued at the moment (controlled by rescued(colour))
everybodysad() - Makes everybody sad (viridian + internal crewmates)
trinketyellowcontrol() - Prints the dialog by Vitellary when he found a trinket
trinketbluecontrol() - Prints the dialog by Victoria when she found a trinket
rollcredits() - Rolls the credits
teleportscript(x) - set internal script "x" as "teleportscript".
clearteleportscript(x) - removes "teleportscript"
ifwarp(x) - Huh?

Teleportscript is a script that overrides the default teleport functionality (open a map and choose destination). It's used in the maingame when you've just rescued a crewmate.

Dav999

Quote from: FIQ on August 14, 2012, 06:45:30 PM
Quote from: Dav999 on August 14, 2012, 06:14:39 PM
Some new commands:

befadein()
changedir(colour,direction)
createactivityzone(colour)
createrescuedcrew()
everybodysad()
trinketyellowcontrol()
trinketbluecontrol()
rollcredits()
teleportscript(levelonecomplete)

I forgot to include these:

musicfadeout()
stopmusic()

These commands turn out to be different than I thought (@FIQ: did you know about this?):

gotoposition(x,y,z) turns out to have an extra argument, the z is whether you end up flipped or not, but you can also use that command with only two arguments
playef(x,n) also turns out to have an extra argument, and I don't know what that argument does (in the real game, it's always 10, but you can also use that command with only one argument)

It looks like there are also some unused commands:

ifwarp(x) ?
clearteleportscript(x) ?

The list has been updated!
befadein() - Instantly fades in
changedir(colour,left|right) - Changes what direction a crewmate is facing
createactivityzone(colour) - Create a "Press ACTION to talk to (Crewmate)" zone, flags will decide which line is used
createrescuedcrew() - Creates all the crewmates that's rescued at the moment (controlled by rescued(colour))
everybodysad() - Makes everybody sad (viridian + internal crewmates)
trinketyellowcontrol() - Prints the dialog by Vitellary when he found a trinket
trinketbluecontrol() - Prints the dialog by Victoria when she found a trinket
rollcredits() - Rolls the credits
teleportscript(x) - set internal script "x" as "teleportscript".
clearteleportscript(x) - removes "teleportscript"
ifwarp(x) - Huh?

Teleportscript is a script that overrides the default teleport functionality (open a map and choose destination). It's used in the maingame when you've just rescued a crewmate.

changedir doesn't support left/right, only numbers. I had already added a description of what everybodysad() and rollcredits() do, and that trinket[colour]control() had something to do with :victoria: or :vitellary: giving you a trinket. But does befadein() instantly fade in from fadeout()? clearteleportscript(x) doesn't appear in any script, so when is it used? And does createactivityzone(terminal) make "Press ENTER to activate terminal"? (and createactivityzone(terminals) "Press ENTER to activate terminals", as seen in the ship?)

FIQ

Quote from: Dav999 on August 14, 2012, 07:07:53 PM
Quote from: FIQ on August 14, 2012, 06:45:30 PM
Quote from: Dav999 on August 14, 2012, 06:14:39 PM
Some new commands:

befadein()
changedir(colour,direction)
createactivityzone(colour)
createrescuedcrew()
everybodysad()
trinketyellowcontrol()
trinketbluecontrol()
rollcredits()
teleportscript(levelonecomplete)

I forgot to include these:

musicfadeout()
stopmusic()

These commands turn out to be different than I thought (@FIQ: did you know about this?):

gotoposition(x,y,z) turns out to have an extra argument, the z is whether you end up flipped or not, but you can also use that command with only two arguments
playef(x,n) also turns out to have an extra argument, and I don't know what that argument does (in the real game, it's always 10, but you can also use that command with only one argument)

It looks like there are also some unused commands:

ifwarp(x) ?
clearteleportscript(x) ?

The list has been updated!
befadein() - Instantly fades in
changedir(colour,left|right) - Changes what direction a crewmate is facing
createactivityzone(colour) - Create a "Press ACTION to talk to (Crewmate)" zone, flags will decide which line is used
createrescuedcrew() - Creates all the crewmates that's rescued at the moment (controlled by rescued(colour))
everybodysad() - Makes everybody sad (viridian + internal crewmates)
trinketyellowcontrol() - Prints the dialog by Vitellary when he found a trinket
trinketbluecontrol() - Prints the dialog by Victoria when she found a trinket
rollcredits() - Rolls the credits
teleportscript(x) - set internal script "x" as "teleportscript".
clearteleportscript(x) - removes "teleportscript"
ifwarp(x) - Huh?

Teleportscript is a script that overrides the default teleport functionality (open a map and choose destination). It's used in the maingame when you've just rescued a crewmate.

changedir doesn't support left/right, only numbers. I had already added a description of what everybodysad() and rollcredits() do, and that trinket[colour]control() had something to do with :victoria: or :vitellary: giving you a trinket. But does befadein() instantly fade in from fadeout()? clearteleportscript(x) doesn't appear in any script, so when is it used? And does createactivityzone(terminal) make "Press ENTER to activate terminal"? (and createactivityzone(terminals) "Press ENTER to activate terminals", as seen in the ship?)
Didn't see your descriptions, sorry (and yes, I meant 0|1).
befadein() fades in instantly from a black screen (from fadeout()), yes.
createactivityzone() will only support the crewmate colors (and "terminal", not "terminals"). It will default to "terminal", which will output the one at the Laboratory ("?SYNTAX ERROR").

clearteleportscript(x) isn't used, but it does remove the teleportscript that is set.

Dav999

#100
But how is that teleport script cleared if the command is not used? Wouldn't that script just repeat each time you get to a teleporter or is this done with flags?

EDIT: createactivityzone(terminal) will create a zone with 'Press ENTER to explode'. :vermillion: If you press enter, you get the first part of the cutscene in the beginning.

'Press ENTER to explode' ??? I'm pretty sure it's used nowhere in the game...

ToasterApocalypse

Question: How to stop all music with play()?

Dav999

Quote from: ToasterApocolypse on August 14, 2012, 08:16:15 PM
Question: How to stop all music with play()?

musicfadeout() if you want it to fadeout, and stopmusic() if you want it to stop instantly.

ToasterApocalypse

Quote from: Dav999 on August 14, 2012, 08:20:10 PM
Quote from: ToasterApocolypse on August 14, 2012, 08:16:15 PM
Question: How to stop all music with play()?

musicfadeout() if you want it to fadeout, and stopmusic() if you want it to stop instantly.

Thanks. I was just working on the end script for switchback and I wanted to stop the music for some sort of dramatic effect of sorts.

Dav999

If you use clearteleportscript, which of the following is correct:
-clearteleportscript
-clearteleportscript()
-clearteleportscript(the script which was set earlier)

Which brings me to another question that just needs to be asked. Why do some commands have () after them? (Question for Terry, maybe)