Author Topic: Internal commands  (Read 258388 times)

FIQ

  • Captain
  • *****
  • Posts: 811
  • https://github.com/FredrIQ/
    • View Profile
    • FIQ
Re: Internal commands
« Reply #105 on: August 14, 2012, 02:38:01 PM »
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)
() will not really have any effect. "endcutscene" and "encutscene()" does the same. I guess the latter was used to make it more readable.

clearteleportscript shouldn't be used with any parameter.

Also, I don't think you understand what it really does.

teleportscript(x): teleportscript="x"
clearteleportscript(): teleportscript=""

It just clears the fact that "x" should be used as the teleportscript. Look at tsave/qsave.vvv, there's a teleportscript attribute there. Usually it's empty, but when you've rescued a crewmate (but not exited the level) and save, you end up with content there. This is what will be removed if you use clearteleportscript(). Note that clearteleportscript() is never used in the game - it gets cleared automatically when you use a teleporter when it's running it.

Understand?

Dav999

  • Global Moderator
  • Captain
  • *****
  • Posts: 2173
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #106 on: August 14, 2012, 02:43:59 PM »
Understand?

Yes.

I've updated the second post with some words I found which might be commands or not:

tilecol(x)
moveplayer(?)
donothing
loop
position(centery)
changeai(colour,followpurple/followyellow/followred/followgreen/followblue/faceplayer)
leavesecretlab()
jukebox(x)
resumemusic()
musicfadein()

FIQ

  • Captain
  • *****
  • Posts: 811
  • https://github.com/FredrIQ/
    • View Profile
    • FIQ
Re: Internal commands
« Reply #107 on: August 14, 2012, 02:54:57 PM »
tilecol(x) - doesn't exists
moveplayer(?) - moves player
donothing - noop (essentially the same as writing an unknown command)
loop - see below
position(centery) - see below
changeai(colour,followpurple/followyellow/followred/followgreen/followblue/faceplayer)
followcrewmatecolor - follow that crewmate the same way as "followplayer" but for other crewmates
faceplayer - the auto-reface behaviour they have in ship, etc, when they automatically looks where Viridian is.
leavesecretlab() - turn off "secret lab mode" (i.e. pause menu showing different things)
jukebox(x) - better use play(x) instead, it plays different jukebox music
resumemusic() - opposite of stopmusic()
musicfadein() - opposite of musicfadeout()

position(centerx) - Makes the dialog at center at X axis
position(centery) - Makes the dialog at center at Y axis

Combine the two and you've the same functionality as position(center). :P

VVVVVVscript (internally) supports looping a certain script more than one time. This is how:

Code: [Select]
squeak(terminal)
text(gray,0,0,2)
This is an example show-off.
Game will flash 5 times!
position(center)
speak_active
endtext
do(5)
flash(5)
playef(9)
shake(20)
delay(30)
loop
squeak(terminal)
text(gray,0,0,1)
See?
position(center)
speak_active
endtext

This was never used in the main game, however. Maybe someone will find an use for it?
You don't want to give it negative numbers unless you like infinite loops, however.
« Last Edit: August 14, 2012, 03:06:05 PM by FIQ »

Dav999

  • Global Moderator
  • Captain
  • *****
  • Posts: 2173
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #108 on: August 14, 2012, 03:25:07 PM »
I know a use for it, I have a sound effect which needs to be played 6 times in a row. Now I wrote that command six times with delays in between.

I still don't understand moveplayer(?). I understood that it had something to do with moving the player ::) But how about the arguments, where does it move the player to, does he walk or teleport, etc.

Oh, and the list has been updated!

FIQ

  • Captain
  • *****
  • Posts: 811
  • https://github.com/FredrIQ/
    • View Profile
    • FIQ
Re: Internal commands
« Reply #109 on: August 14, 2012, 03:57:10 PM »
moveplayer(x,y) - Moves player x/y amount of pixels. moveplayer(50,0) will send the player 50 pixels right, moveplayer(50,-50) will send the player 50 pixels right and 50 pixels up. It's a gotoposition() relative to current position, pretty much.

There you go :P

Dav999

  • Global Moderator
  • Captain
  • *****
  • Posts: 2173
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #110 on: August 14, 2012, 04:13:44 PM »
Is there also an equivalence for moving crewmates instead of player?

FIQ

  • Captain
  • *****
  • Posts: 811
  • https://github.com/FredrIQ/
    • View Profile
    • FIQ
Re: Internal commands
« Reply #111 on: August 14, 2012, 05:14:49 PM »
Is there also an equivalence for moving crewmates instead of player?
After a quick look, doesn''t seem so! Could've missed it though.

Dav999

  • Global Moderator
  • Captain
  • *****
  • Posts: 2173
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #112 on: August 15, 2012, 01:25:02 AM »
I tested resumemusic() and musicfadein(), and they don't seem to work. Do you have to put a song command underneath or above it or something? They're never used in a built-in script.

EDIT: jukebox(x) also doesn't work. Have you tested these commands?
« Last Edit: August 15, 2012, 01:44:30 AM by Dav999 »

FIQ

  • Captain
  • *****
  • Posts: 811
  • https://github.com/FredrIQ/
    • View Profile
    • FIQ
Re: Internal commands
« Reply #113 on: August 15, 2012, 06:46:53 AM »
I tested resumemusic() and musicfadein(), and they don't seem to work. Do you have to put a song command underneath or above it or something? They're never used in a built-in script.

EDIT: jukebox(x) also doesn't work. Have you tested these commands?
Note to self: try to confirm what I says :D

musicfadein(x) - seems to do essentially nothing (it DOES something, but it doesn't affect gameplay in any way)
resumemusic() - Plays "resumesong", which seems to always be Positive Force
jukebox(x) - Makes a jukebox terminal white and turns off the color off all the other terminals (In custom levels, it just seem to turn off the white color of all activated terminals).
« Last Edit: August 15, 2012, 06:52:25 AM by FIQ »

blue626

  • Captain
  • *****
  • Posts: 672
  • I changed my avatar!
    • View Profile
Re: Internal commands
« Reply #114 on: August 15, 2012, 07:51:45 AM »
I like the idea of warning people about commands that may or are dangerous or can only be used in the main game. But, commands like telesave() aren't always dangerous, as there are some players that always use quicksave. Anyway, keep that warning there.
That reminds me of something. What type of save is the one after completing the Final Level? Quick or tele? Affter making that save and selecting "Continue", it doesn't let you select tele save or quick save and goes directly to the game.

Why are there commands that are never used, even in the main game? Why were they created?

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...

It's probably from a prototype or a beta, like some of the gamestates. Maybe a way to go back to the beggining. Why do they still work? It's similar to the way the tiles that only appeared in the prototype appeared in Direct Mode in 2.1.beta...

Why, when you use createentity you create trinkets, and collect more than 50, you get "Lots out of Twenty"? Weird, it's similar to the 21st trinket glitch I mentioned before. What does it say when you collect 21? And 22? And >22? It's weird because the number of trinkets is written in words, not numbers.

EDIT: According to one of FIQ's posts, companion(x) might work if you use numbers instead of colors. I don't know why it only worked for :vermillion: when PJBottomz tried.

Btw: 115 replies! For the last 2 4 days, this has been the only thread in this board with new posts. And, lost of posts!
« Last Edit: August 15, 2012, 07:58:41 AM by blue626 »

FIQ

  • Captain
  • *****
  • Posts: 811
  • https://github.com/FredrIQ/
    • View Profile
    • FIQ
Re: Internal commands
« Reply #115 on: August 15, 2012, 08:30:26 AM »
I like the idea of warning people about commands that may or are dangerous or can only be used in the main game. But, commands like telesave() aren't always dangerous, as there are some players that always use quicksave. Anyway, keep that warning there.
That reminds me of something. What type of save is the one after completing the Final Level? Quick or tele? Affter making that save and selecting "Continue", it doesn't let you select tele save or quick save and goes directly to the game.

Why are there commands that are never used, even in the main game? Why were they created?

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...

It's probably from a prototype or a beta, like some of the gamestates. Maybe a way to go back to the beggining. Why do they still work? It's similar to the way the tiles that only appeared in the prototype appeared in Direct Mode in 2.1.beta...

Why, when you use createentity you create trinkets, and collect more than 50, you get "Lots out of Twenty"? Weird, it's similar to the 21st trinket glitch I mentioned before. What does it say when you collect 21? And 22? And >22? It's weird because the number of trinkets is written in words, not numbers.

EDIT: According to one of FIQ's posts, companion(x) might work if you use numbers instead of colors. I don't know why it only worked for :vermillion: when PJBottomz tried.

Btw: 115 replies! For the last 2 4 days, this has been the only thread in this board with new posts. And, lost of posts!
:vermillion: is the default character with companion(). I guess PJBottomz played with it and never tried numbers.

EDIT: The reason that the wordnumbers doesn't go over 50 is probably because how Terry implemented it. I guess he just made 51 different words instead of doing it dynamically, and made "Lots" a default word when none else is used. Why he made 51 (0-50) instead of 21 (0-20) is something that I've no idea of though (Terry would know it, definitely :p)
« Last Edit: August 15, 2012, 08:33:59 AM by FIQ »

Dav999

  • Global Moderator
  • Captain
  • *****
  • Posts: 2173
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #116 on: August 15, 2012, 09:15:26 AM »
I like the idea of warning people about commands that may or are dangerous or can only be used in the main game. But, commands like telesave() aren't always dangerous, as there are some players that always use quicksave. Anyway, keep that warning there.
That reminds me of something. What type of save is the one after completing the Final Level? Quick or tele? Affter making that save and selecting "Continue", it doesn't let you select tele save or quick save and goes directly to the game.

It uses tele, because there is a teleporter at the end of every level, which you have to touch. So if I understand it well, it deletes your quick save? :-\

Why are there commands that are never used, even in the main game? Why were they created?

I guess Terry just started off with a few commands, and adding commands each time he needed one. So maybe he needed to have a loop in one script, created a do(n) and loop command, then decided it was better to do it in another way and just left it there. Just like clearteleporterscript(), it would be used after every teleporter, but then it was decided that it was much better to put it in a teleporter by default (or maybe it was used after you find a crewmate and then backtrack to another teleporter, and then it was a much better idea to just not make the player able to go back after finding a crewmate.)

Why, when you use createentity you create trinkets, and collect more than 50, you get "Lots out of Twenty"? Weird, it's similar to the 21st trinket glitch I mentioned before. What does it say when you collect 21? And 22? And >22? It's weird because the number of trinkets is written in words, not numbers.

I think that the maximum number of anything wouldn't go above 50, and that if you go above that it would say 'Lots'. I think that those words were put in the game before the idea to put 20 trinkets in the game.

EDIT: According to one of FIQ's posts, companion(x) might work if you use numbers instead of colors. I don't know why it only worked for :vermillion: when PJBottomz tried.

Companion only works with numbers, and in the real game, only numbers are used. Strangely enough, only if you use it with :vermillion:, he will walk across screens. :-\ Maybe it has something to do with that his teleporter is to the right, and most of the others had to leave on the left or something.

FIQ

  • Captain
  • *****
  • Posts: 811
  • https://github.com/FredrIQ/
    • View Profile
    • FIQ
Re: Internal commands
« Reply #117 on: August 15, 2012, 09:16:02 AM »
Looking at the internal commands list, I see that there are no commands to change warp direction, tile set and room-name, like in the Final Level. So, I suppose that the Polar Dim. has 2 altsates too, am I right?
Also, you mentioned ifflag twice, not describing it right the 2nd time. EDIT: No, you didn't. I was wrong.

EDIT 2:
Enemies has the following: X, Y, 1 (Entity ID), Direction, Speed, Border1 X, Border1 Y, Border2 X, Border2 Y

Why do you need the last 4 values if you have the first 2? Do they define the enemy size? If they are needed for some reason, why do you need the first 2? Why did you mention that if you can't create costum enemies with createentity?
These are enemy borders (the ones that you in custom levels set with F4).

Dav999

  • Global Moderator
  • Captain
  • *****
  • Posts: 2173
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #118 on: August 15, 2012, 09:23:32 AM »
F4? Is that only in 2.1? ???

FIQ

  • Captain
  • *****
  • Posts: 811
  • https://github.com/FredrIQ/
    • View Profile
    • FIQ
Re: Internal commands
« Reply #119 on: August 15, 2012, 09:32:09 AM »
F4? Is that only in 2.1? ???
Yep, 2.1 has nicer keybindings in the level editor. It's shift+4 in 2.0 IIRC.

The quicksave isn't deleted, but is hidden. If you somehow destroy your telesave to the state before the game is complete, it'll reappear.