distractionware forums

VVVVVV => VVVVVV Levels => Topic started by: FIQ on June 24, 2012, 03:16:04 PM

Title: Script commands index and hints
Post by: FIQ on June 24, 2012, 03:16:04 PM
Hi. Even if PJBottomz is awesome and has already made a tutorial in the form of a VVVVVV level, I felt that it would probably be nice to have a list of the commands and the usage of them, and examples, and hints/tricks, and hard limits.

Link to PJBottomz level for those that want a nice pedagogic way of looking how to script: http://distractionware.com/forum/index.php?topic=450.0

This might or might not look over-complicated. If you feel like it is, please see the above link instead, to get started on scripting. This is just thought as a list of the commands, plus technical details, and some usage hints at the bottom.

And here it goes...

Quick info
Things in [] are optional and not required for the basic usage of a command. When | is used, it means either one thing or another ("A|B" means that it can be A or B).
I will not cover exploits.

Command Index
Commands in the current stable version - 2.0
* - Usage was updated in the 2.1 beta, see below for new usage. Note that 2.0 usage will always work in 2.1, but not the opposite!

say(N)*
Opens a gray text dialog of N lines. Text below the command will be part of the text dialog.
Variables:
N - a number between 1 and 5
Example:
say(3)
This is a test
using the say
command!

reply(N)*
Opens a cyan text dialog, positioned relatively to Viridian of N lines. Text below will be part of the text dialog.
Usage:
N - a number between 1 and 5
Example:
reply(2)
Hello!
This is a dialog

delay(N)
Delays further actions by N ingame ticks. To get an idea of how long a tick is - 30 ticks is *almost* 1 second (it's very slightly longer).
Usage:
N - a number 1 or more.
Example: delay(15)

destroy(warptokens|gravitylines)
Destroys every warp token, or every gravity line, on the screen.
Usage: none
Example: destroy(warptokens)

music(N)
Changes the music ingame to track N.
Usage:
N - a number between 0 and 11, which means the following:
0 - Silence (no music)
1 - Pushing onwards
2 - Positive force
3 - Potential for anything
4 - Passion for exploring
5 - Presenting VVVVVV
6 - Predestined fate
7 - Popular potpurri
8 - Pipe dream
9 - Pressure cooker
10 - Paced energy
11 - Piercing the sky
Example: music(4)

flash
Makes the screen white, shake, and play the flash sound effect.
Usage: none
Example: flash

happy*
Makes Viridian happy.
Usage: none
Example: happy

sad*
Makes Viridian sad.
Usage: none
Example: sad

flag(N,off|on)
Turns an ingame flag on or off.
Usage:
N - a number between 0 and 99 except for 67, see bottom of the thread
Example: flag(63,on)

ifflag(N,S)
If flag N is turned on, runs a script named S in case you have a script with that name.
Usage:
N - a number between 0 and 99 except for 67, see bottom of the thread
S - a script name
Example: ifflag(49,destroywarps)

iftrinkets(N,S)
If you have N (or more) trinkets, run the script S.
Usage:
N - a number between 0 and 20
S - a script name
Example: iftrinkets(20,foundalltrinkets)

iftrinketsless(N,S)
If you have less than N trinkets, run the script S.
This command doesn't work correctly at the moment. Don't use it!
Usage:
N - a number between 0 and 20
S - a script name
Example: iftrinketsless(20,findmoretrinkets)

Commands in the 2.1 beta
Changed commands
say(N[,C])
The optional usage here is to change the dialog color to something else than gray via C. Also, N can now be more than 5. The dialog will be positioned adjacant to any possible crewmate the room, or center otherwise.
Usage:
N - a number between 1 and 11
C - 1/viridian/cyan/player, 2/violet/pink/purple, 3/vitellary/yellow, 4/vermillion/red, 5/verdigris/green, 6/victoria/blue
Example:
say(2,violet)
This is a
purple dialog!

happy(C)
Makes a crewmate happy.
Usage:
C - a crewmate's name or all/everyone/everybody
Example:
happy(violet)

sad(C)
Makes a crewmate sad.
Usage:
C - a crewmate's name or all/everyone/everybody
Example:
sad(vitellary)

New commands
map(on|off)
Turns the ingame map on or off (in which NO SIGNAL is showed). In 2.1, the default is on, but in 2.0, maps is never used.
Usage: none
Example: map(off)

squeak(on|off|C)
Turns the squeaking sounds when you use dialogs on or off, or make a crewmate sound.
Usage:
on - Turns the squeaking on when using dialogs (default behaviour).
off - Turns all the squeaking sounds off. This does NOT affect the effect of a forced squeak done with squeak(crewmate).
C - A crewmate, "terminal", "cry" or "player".


---------------


Hints
* When loading scripts, ensure that you have an additional end at the bottom, preferably with nothing in it. This is in addition to the already empty line. Due to a bug, the last line in a loaded script is read wrongly and thus depending on what you're trying to do, might not work as expected.
* Normally, you shouldn't over-use delay(). Many that are confident with scripting tend to do this. This hinders gameplay, which is the most important thing. delay() is nice sometimes, but don't have it too often, it will be a bit frustrating then.
* Many people want to make scripts execute only one time, in which case flags are really useful. To do this, you can use iftrinkets(0,script) as a "loadscripter". This works because you always have 0 (or more) trinkets. Then, you can have a script that checks if a flag is on, and then do nothing. Otherwise, run the "real" script. Like this:

Quote
Name: scripta
ifflag(2,stop)
iftrinkets(0,scriptb)

Name: scriptb
say(1)
This will execute one time only!
flag(2,on)

Name: stop - empty script file.
The reason for why you need to seperate scripta and scriptb is that if VVVVVV encounters dialogs in a script, it will turn on cutscenebars (the black borders at the bottom and the top), no matter whether it will actually run or not. So if you don't seperate it like this, you'll end up with nice black borders every time you run the script after the first time (instead of nothing happening at all). You don't have to seperate them if you don't have dialogs, however. Hopefully this will get fixed, but it's like this currently.

* When you load other scripts via ifflag(), or iftrinkets/iftrinketsless, bear in mind that your script MUST be all lowercase. If this is not the case, the script will not be loaded.
* Never use colons (:) in scripts, i.e. in dialogs. If you do, you will corrupt all of your scripts when you save the level. This is because of how VVVVVV store the scripts internally when saving to a .vvvvvv file.
* You MUST have a newline at the end of a script file. Otherwise, the bottom line will be erased. If this happens to be a part of a dialog - too bad, because VVVVVV will crash when it encounters the end before it has placed all the lines as it want!
* Don't have say(6+) or reply(6+) in 2.0, or 11+ in 2.1. If you have a say/reply command that is 6+ in 2.0, VVVVVV will do strange things and you may or may not end up with a crash. Don't try to exploit with this if you find any actual use out of this, as it's not really compatible with newer versions of VVVVVV. Having a say/reply of 11+ in the 2.1 beta will just make VVVVVV crash.
* If you do a very long dialog, and when testing the script encounter a completely empty dialog - you'll have to end the script and begin a new script (you can use iftrinkets(0,script) as a "loadscripter" as described above) before that part, because you've just encountered the higher limit of a script's length before VVVVVV crash when attempting to run it.
* Flag 67 is used in the main game for deciding on whether you should be able to teleport to the ship via the pause menu or not. This flag does this in custom levels too, and if you do it, your main game save will be destroyed. Don't use this flag!

Limits
* Amount of script lines max before VVVVVV crashes if you try to run it: 198
* Amount of script lines before you can't even insert more w/o running: 500
* Amount of scripts: 500
* Amount of entities (excluding spikes): 3000
* Amount of entities (spikes included) in a single room: 500

Exceeding these limits will make VVVVVV segfault immediately. The same if you load such a level.
Title: Re: Script commands index and tips
Post by: blue626 on June 25, 2012, 04:28:13 AM
I think that this is a good idea, it should help anyone that has 2.1.beta.
However, you should have created this thread in the VVVVVV board (I think this board is for levels only).
Also, you made some mistakes:
In iftrinkets and iftrinketsless, I think that N can only be 0-20 (not sure if 0 works).
Also, I've heard that iftrinketsless doesn't work (at least in 2.0.).
According to theSome scripting commands (http://distractionware.com/forum/index.php?topic=406.0) thread, in flag, N can only be 1-99 (that isn't much important).
Also, you said to not have a say/reply(6+) in v.2.0. when you shouldn't have 5+ (you said that, in say/reply, N is 1-5).
Like I said before, I'm not sure if iftrinkets(0,S) works, but if it works, you won't need a loadscript flag when dividing long dialogs, for example. You can also use for executing scripts only once:

scripta:
ifflag(1,stop)
iftrinkets(0,scriptb)

scriptb:
(dialog)
flag(1,on)

stop:
(empty or different dialog)
Title: Re: Script commands index and tips
Post by: Pyrite on June 25, 2012, 05:13:14 AM
Also, happy(crewmate/color) works, as well as sad(crewmate/color
Title: Re: Script commands index and tips
Post by: blue626 on June 25, 2012, 08:10:17 AM
Iftrinkets(0,S) works! Executing scripts only once like I did above doesn't need flag 1 and the init script (referring to the scripts FIQ wrote to execute scripts only once).
Title: Re: Script commands index and tips
Post by: FIQ on June 25, 2012, 10:30:30 AM
Iftrinkets(0,S) works! Executing scripts only once like I did above doesn't need flag 1 and the init script (referring to the scripts FIQ wrote to execute scripts only once).
Good idea. I tried iftrinketsless(21,blabla) once, but sometimes it just didn't work.

Will replace the above by your suggestion.

I think that this is a good idea, it should help anyone that has 2.1.beta.
However, you should have created this thread in the VVVVVV board (I think this board is for levels only).
Also, you made some mistakes:
In iftrinkets and iftrinketsless, I think that N can only be 0-20 (not sure if 0 works).
Also, I've heard that iftrinketsless doesn't work (at least in 2.0.).
According to theSome scripting commands (http://distractionware.com/forum/index.php?topic=406.0) thread, in flag, N can only be 1-99 (that isn't much important).
Also, you said to not have a say/reply(6+) in v.2.0. when you shouldn't have 5+ (you said that, in say/reply, N is 1-5).
Like I said before, I'm not sure if iftrinkets(0,S) works, but if it works, you won't need a loadscript flag when dividing long dialogs, for example. You can also use for executing scripts only once:

scripta:
ifflag(1,stop)
iftrinkets(0,scriptb)

scriptb:
(dialog)
flag(1,on)

stop:
(empty or different dialog)
Thanks for the feedback!

I belive it is supposed to be here. Might be wrong though, and someone with the right power can move it if this is the case.
iftrinkets() typo was paste fail. :P
Flags is only 1-99? I thought it went to 100? Have to test this one...
Title: Re: Script commands index and tips
Post by: Vallu on June 25, 2012, 06:19:44 PM
Thank you very much for this! This helped me a lot to learn scripting. I'm making my first awesome level, I can't release it here though becauce I'm making it in Finnish.. :P
Title: Re: Script commands index and tips
Post by: Bearboy on June 26, 2012, 12:47:53 PM
is there any easy way to explain iftrinkets and iftrinketsless? I'm having a bit of trouble with it, for example, if you need 4 trinkets to destroy a warp line, and you use a terminal to use the script, would I have to make different script boxes?

Then again, I might figure it out on my own, eventually.

But I doubt it  :verdigris:
Title: Re: Script commands index and tips
Post by: Hilbert on June 26, 2012, 02:03:31 PM
script1:
iftrinkets(4,gravline)
say(2)
You need to get 4 trinkets to destroy
the gravity line.
_______________________________
gravline:
destroy(gravitylines)
say(1)
Gravity line destroyed.
____________________

This way if you have 4 trinkets it will destroy the line,
but if you don't, it will tell you you need to get four.

did that help? :viridian:
Title: Re: Script commands index and tips
Post by: Bearboy on June 26, 2012, 02:21:14 PM
script1:
iftrinkets(4,gravline)
say(2)
You need to get 4 trinkets to destroy
the gravity line.
_______________________________
gravline:
destroy(gravitylines)
say(1)
Gravity line destroyed.
____________________

This way if you have 4 trinkets it will destroy the line,
but if you don't, it will tell you you need to get four.

did that help? :viridian:

Would I write all of this into one terminal, including the colons? If this is correct, you're amazing.
And I can't believe you know this stuff given your age, lol  :viridian:
Title: Re: Script commands index and tips
Post by: FIQ on June 26, 2012, 02:34:18 PM
script1:
iftrinkets(4,gravline)
say(2)
You need to get 4 trinkets to destroy
the gravity line.
_______________________________
gravline:
destroy(gravitylines)
say(1)
Gravity line destroyed.
____________________

This way if you have 4 trinkets it will destroy the line,
but if you don't, it will tell you you need to get four.

did that help? :viridian:

Would I write all of this into one terminal, including the colons? If this is correct, you're amazing.
And I can't believe you know this stuff given your age, lol  :viridian:
Nope, they're two different scripts!
I.e. you create a script with the name "script1" with the content RoskillaHULK told, and a script named "gravline" with that content.

And you use "script1" as your main script (i.e. the script that the terminal targetted)

Also, NO COLONS. Ever (see the "tips" section in the main post for why).
Title: Re: Script commands index and tips
Post by: Bearboy on June 27, 2012, 05:28:42 AM
Iftrinkets works! I'm using it in a level now. Thanks you two
Title: Re: Script commands index and tips
Post by: Vallu on June 28, 2012, 04:25:20 PM
I'm having a problem (again)...  There is a room where is  :verdigris: in the other side and gravitylines in the other side. How do I make this happen: After rescuing  :verdigris: and walking to middle of the room a script will happen (:verdigris: says something with the "say" command and gravitylines disappear). I placed a script like this to where  :verdigris: is: "flag(1,on)". And I placed a script like this to middle of the room: "ifflag(1,verdigrisdestroylines)" and I did put the vergidrisdestroylines script randomly to the room where it can't be touched. If I did this wrong, how do I do it? (I hope you understand my bad english... :victoria:)
Title: Re: Script commands index and tips
Post by: FIQ on June 28, 2012, 04:49:58 PM
I'm having a problem (again)...  There is a room where is  :verdigris: in the other side and gravitylines in the other side. How do I make this happen: After rescuing  :verdigris: and walking to middle of the room a script will happen (:verdigris: says something with the "say" command and gravitylines disappear). I placed a script like this to where  :verdigris: is: "flag(1,on)". And I placed a script like this to middle of the room: "ifflag(1,verdigrisdestroylines)" and I did put the vergidrisdestroylines script randomly to the room where it can't be touched. If I did this wrong, how do I do it? (I hope you understand my bad english... :victoria:)
First at all, you can remove the "vergidrisdestroylines" scriptbox - the script will not be deleted.
Secondly, will Viridian touch the middle before Verdigris is rescued? Because that will trigger the script (which will do nothing), and then leave it activated like that. Try to go back one room and then do it. If this works, you know what the problem is.
Title: Re: Script commands index and tips
Post by: Hilbert on June 28, 2012, 06:01:14 PM
BTW, if you have more than one destroy(gravitylines) script, you could use it twice.

Say :vermillion: is under a line and in another room  :victoria: is under a line, make a script called gravline and put destroy(gravitylines) and use it when you rescue both of them  :viridian:
Title: Re: Script commands index and tips
Post by: blue626 on June 30, 2012, 10:08:30 AM
If someone, using 2.1 beta, plays a level made in 2.0, does that person see the map? If the answer is yes, I must ask this: does the command map(on/off) create any glitches in 2.0?

EDIT: In the "some scripting commands" thread (see my 1st post above) someone mentioned a way to make scripts execute only once:

What is the command to destroy a script box after it's used?
There isn't one.  You have to use what I call "trigger scripts", or secondary scripts, that use ifflags to make sure a script doesn't run twice.  It's kind of a pain, and one of the reasons my level is taking so long to make.  Example of what I do:

Example script: "talking1trigger"
Code: [Select]
ifflag(1,talking1)
end()

Example script: "talking1"
Code: [Select]
say(2)
this script will
only run once!
flag(1,off)
end()

This assumes the flag used was turned "on" previously.

This method uses 2 scripts and 1 flag per terminal/script box and an "init" script. The method I suggested uses 2 scripts and 1 flag per terminal/script box and a "stop" script. The method on this quote is as good as the other one. Note: I think that the "end" commands aren't necessary.
Title: Re: Script commands index and tips
Post by: FIQ on June 30, 2012, 10:50:53 AM
If someone, using 2.1 beta, plays a level made in 2.0, does that person see the map? If the answer is yes, I must ask this: does the command map(on/off) create any glitches in 2.0?

EDIT: In the "some scripting commands" thread (see my 1st post above) someone mentioned a way to make scripts execute only once:

What is the command to destroy a script box after it's used?
There isn't one.  You have to use what I call "trigger scripts", or secondary scripts, that use ifflags to make sure a script doesn't run twice.  It's kind of a pain, and one of the reasons my level is taking so long to make.  Example of what I do:

Example script: "talking1trigger"
Code: [Select]
ifflag(1,talking1)
end()

Example script: "talking1"
Code: [Select]
say(2)
this script will
only run once!
flag(1,off)
end()

This assumes the flag used was turned "on" previously.

This method uses 2 scripts and 1 flag per terminal/script box and an "init" script. The method I suggested uses 2 scripts and 1 flag per terminal/script box and a "stop" script. The method on this quote is as good as the other one. Note: I think that the "end" commands aren't necessary.
As map(on|off) is non-existent in 2.0, it will not cause any glitches. The parser will just remove the line as it doesn't recognize it as a custom-level-script. :P
Title: Re: Script commands index and tips
Post by: Vallu on June 30, 2012, 12:15:39 PM
Thank you for all your help! I decided to put the talking scene to other room. I also decided to make an English version of my Finnish level when it's done so I could release it here! :viridian: It's going to be pretty long and hard (especially some of :shiny:'s). Is there any active custom level players who could download it and play it? (if not, I don't see why could I make an English version) There is also pretty exciting and "epic" story. (The level is called "Viridian's bad day")

Sorry for my bad English and offtopic!

Edit: Ok! I'll think about making an English version.
Title: Re: Script commands index and tips
Post by: FIQ on June 30, 2012, 12:16:57 PM
Thank you for all your help! I decided to put the talking scene to other room. I also decided to make an English version of my Finnish level when it's done so I could release it here! :viridian: It's going to be pretty long and hard (especially some of :shiny:'s). Is there any active custom level players who could download it and play it? (if not, I don't see why could I make an English version) There is also pretty exciting and "epic" story. (The level is called "Viridian's bad day")

Sorry for my bad English and offtopic!
There's not as many as when 2.0 was released a year ago, but there's still some active people here.
Title: Re: Script commands index and tips
Post by: blue626 on June 30, 2012, 12:24:55 PM
If someone, using 2.1 beta, plays a level made in 2.0, does that person see the map? If the answer is yes, I must ask this: does the command map(on/off) create any glitches in 2.0?

(rest of my post)

As map(on|off) is non-existent in 2.0, it will not cause any glitches. The parser will just remove the line as it doesn't recognize it as a custom-level-script. :P

Does the parser remove the line when I use these commands? Will they create glitches?

say(N,crewmate)
happy/sad(crewmate)
Title: Re: Script commands index and tips
Post by: FIQ on June 30, 2012, 03:32:28 PM
If someone, using 2.1 beta, plays a level made in 2.0, does that person see the map? If the answer is yes, I must ask this: does the command map(on/off) create any glitches in 2.0?

(rest of my post)

As map(on|off) is non-existent in 2.0, it will not cause any glitches. The parser will just remove the line as it doesn't recognize it as a custom-level-script. :P

Does the parser remove the line when I use these commands? Will they create glitches?

say(N,crewmate)
happy/sad(crewmate)
No, they will just work as in 2.0.
Title: Re: Script commands index and tips
Post by: FIQ on July 29, 2012, 12:52:29 PM
bump
Title: Re: Script commands index and tips
Post by: Dav999 on July 29, 2012, 02:16:55 PM
If I use the internal command hidecoordinates(x,y), does that work if I want to hide a room from the map of custom levels in 2.1? I'm asking because I still can't use 2.1. What I want to do: the start point of my level is in the ship. It starts with a cutscene in which :viridian: gets teleported somewhere else. Is it possible to hide the ship after that? Otherwise I'm afraid I have to completely turn off the map again, or do a huge redesign of my level... :victoria:

EDIT: also, does map(off) clear the map so it's empty if you turn it on again?
Title: Re: Script commands index and tips
Post by: FIQ on July 30, 2012, 03:43:54 AM
If I use the internal command hidecoordinates(x,y), does that work if I want to hide a room from the map of custom levels in 2.1? I'm asking because I still can't use 2.1. What I want to do: the start point of my level is in the ship. It starts with a cutscene in which :viridian: gets teleported somewhere else. Is it possible to hide the ship after that? Otherwise I'm afraid I have to completely turn off the map again, or do a huge redesign of my level... :victoria:

EDIT: also, does map(off) clear the map so it's empty if you turn it on again?
You can use hidecoordinates() for that, yes. Do note that internally, map coordinates start with 0 instead of 1, however (as with gotoroom()).
map(off) just make the map work like in intermissions, but doesn't hide the map (It even still fill it, allthought you'll not see that before map(on) again!)
Title: Re: Script commands index and tips
Post by: Dav999 on July 30, 2012, 06:19:15 AM
If I use the internal command hidecoordinates(x,y), does that work if I want to hide a room from the map of custom levels in 2.1? I'm asking because I still can't use 2.1. What I want to do: the start point of my level is in the ship. It starts with a cutscene in which :viridian: gets teleported somewhere else. Is it possible to hide the ship after that? Otherwise I'm afraid I have to completely turn off the map again, or do a huge redesign of my level... :victoria:

EDIT: also, does map(off) clear the map so it's empty if you turn it on again?
You can use hidecoordinates() for that, yes. Do note that internally, map coordinates start with 0 instead of 1, however (as with gotoroom()).
map(off) just make the map work like in intermissions, but doesn't hide the map (It even still fill it, allthought you'll not see that before map(on) again!)

Ok, I knew it starts with 0,0, but I have no idea how maps work in 2.1, so I didn't know if hidecoordinates() only worked on the map in the real game. It could have been just like crewmates: in the real game they're different from the crewmates in custom levels.
Title: Re: Script commands index and tips
Post by: Dav999 on August 13, 2012, 12:58:43 PM
I don't have much experience with 2.1 scripting, and I have some questions.

1. If you want a dialog with a certain colour in 2.1, and it only has one line, can you skip the number and just use say(colour)?
2. Does reply(N[,C]) also work?
3. If you use for instance say(n,red) and after that use say(n), will that second dialog also be red? And if you want a dialog after that to be gray, will say(n,gray) or say(n,terminal) work?
4. I read something about there being a squeak command in simplified scripting, and also the ability to turn squeaking on and off with that command. Does that mean you can turn squeaking off with squeak(off) and on with squeak(on)?
Title: Re: Script commands index and tips
Post by: blue626 on August 13, 2012, 02:02:49 PM
I don't have much experience too (because I have 2.0) but I think I can help you:

Title: Re: Script commands index and tips
Post by: FIQ on August 13, 2012, 03:04:33 PM
I don't have much experience with 2.1 scripting, and I have some questions.

1. If you want a dialog with a certain colour in 2.1, and it only has one line, can you skip the number and just use say(colour)?
2. Does reply(N[,C]) also work?
3. If you use for instance say(n,red) and after that use say(n), will that second dialog also be red? And if you want a dialog after that to be gray, will say(n,gray) or say(n,terminal) work?
4. I read something about there being a squeak command in simplified scripting, and also the ability to turn squeaking on and off with that command. Does that mean you can turn squeaking off with squeak(off) and on with squeak(on)?
1: No.
2: No. (Why do you want to do that anyway?)
3: There's currently a bug that stops you from being able to change color back to gray, PJBottomz told about it in VVVVVV Tech Discussion. I think splitting the script reverts it, though.
4:
...You can turn *off* squeaking?

*tests*

Oooh, didn't know about that. But it seems to work, yes! But it's just temporary, when you execute a new script, it'll be on again. And also, this seem to be simple-script only (didn't see that coming), squeak() internally still works as usual.
Title: Re: Script commands index and tips
Post by: Dav999 on August 13, 2012, 03:20:53 PM
2: No. (Why do you want to do that anyway?)

Just asking. :)

3: There's currently a bug that stops you from being able to change color back to gray, PJBottomz told about it in VVVVVV Tech Discussion. I think splitting the script reverts it, though.

So it does stay red?

4:
...You can turn *off* squeaking?

*tests*

Oooh, didn't know about that. But it seems to work, yes! But it's just temporary, when you execute a new script, it'll be on again. And also, this seem to be simple-script only (didn't see that coming), squeak() internally still works as usual.

Ok, great, that way at least 2.1 users won't hear a terminal sound every time you start using internal scripting.
Title: Re: Script commands index and tips
Post by: FIQ on August 13, 2012, 03:29:44 PM
2: No. (Why do you want to do that anyway?)

Just asking. :)

3: There's currently a bug that stops you from being able to change color back to gray, PJBottomz told about it in VVVVVV Tech Discussion. I think splitting the script reverts it, though.

So it does stay red?

4:
...You can turn *off* squeaking?

*tests*

Oooh, didn't know about that. But it seems to work, yes! But it's just temporary, when you execute a new script, it'll be on again. And also, this seem to be simple-script only (didn't see that coming), squeak() internally still works as usual.

Ok, great, that way at least 2.1 users won't hear a terminal sound every time you start using internal scripting.
Hahahah, always found that annoying, wasn't aware that you could turn it off :P
Title: Re: Script commands index and tips
Post by: Dav999 on August 13, 2012, 03:42:57 PM
You could also have used use reply(-1) text(1,0,0,4) reply(5) instead of say, because the sound you get when you use say is about 4x longer than the sound you get when you use reply.
Title: Re: Script commands index and tips
Post by: Bearboy on August 14, 2012, 02:03:28 AM
Thank you for all your help! I decided to put the talking scene to other room. I also decided to make an English version of my Finnish level when it's done so I could release it here! :viridian: It's going to be pretty long and hard (especially some of :shiny:'s). Is there any active custom level players who could download it and play it? (if not, I don't see why could I make an English version) There is also pretty exciting and "epic" story. (The level is called "Viridian's bad day")

Sorry for my bad English and offtopic!

Edit: Ok! I'll think about making an English version.
Make one.
If you make one that is only finnish, I WILLL NOT KNOW WUT HAPPEN.
Title: Re: Script commands index and tips
Post by: blue626 on September 25, 2012, 11:00:24 AM
This thread needs a bump! Perhaps this should be stickyied?
Title: Re: Script commands index and tips
Post by: avengah on November 19, 2012, 11:16:05 AM
A couple of important points that need adding. The happy and sad commands need extra mention, because if there is an NPC Viridian in the room, the argumentless commands will affect him instead of the player. To make sure you change the player's mood, use any unrecognised argument, e.g. player, me, ruby, poo etc.

Also, "all" works too. It affects everyone on screen, player and NPCs alike. "viridian" and "cyan" both affect the NPC. Note that if there is no cyan NPC in the room, the commands will affect the player, but to guarantee the player is affected, use happy/sad(me) or something.
Title: Re: Script commands index and tips
Post by: blue626 on November 19, 2012, 11:49:43 AM
Also, "all" works too. It affects everyone on screen, player and NPCs alike.

 :o I think that nobody mentioned that before, which makes me think that nobody discovered that before!

Oh, and FIQ, you still didn't wrote about squeak(on/off/crewmate). I wonder if squeak(all) works.

A couple of important points that need adding. The happy and sad commands need extra mention, because if there is an NPC Viridian in the room, the argumentless commands will affect him instead of the player. To make sure you change the player's mood, use any unrecognised argument, e.g. player, me, ruby, poo etc.

Is that only in 2.1.beta or in 2.0. too?
Title: Re: Script commands index and tips
Post by: ToasterApocalypse on November 19, 2012, 12:03:02 PM
me, ruby, poo etc.

 :D
Title: Re: Script commands index and tips
Post by: avengah on November 19, 2012, 01:32:40 PM
I'm going to try In Pursuing Design in 2.0, because that has a glitch which makes NPC Viridian smile. I'm assuming that it'll make the player smile in 2.0, because it's a feature added in 2.1 which probably wasn't implemented correctly - no argument assumes cyan rather than player, which is the mistake. I'll let you know my results.

EDIT: Yeah, in In Pursuing Design, when you're in the room with NPC Viridian, it's the player who becomes sad then happy, not the NPC as in 2.1. So it was a new bug introduced into 2.1 as a side effect of being able to pick who becomes happy and sad. Basically, remember that if you're using cyan NPCs, don't use happy and sad sans argument - put anything in the brackets that isn't a recognised command. Recognised commands are:

1, viridian, cyan, [no argument] (=NPC if it exists; if not, then the player)
2, violet, pink, purple
3, vitellary, yellow
4, vermilion, red
5, verdigris, green
6, victoria, blue
all, everyone, everybody (player and NPCs)
0, 7, 8 etc, me, player, random words, anything else = player guaranteed, not cyan NPCs.

So numbers work, and there are three ways to specify "all" that I've found so far. "every" doesn't work, so everyone and everybody must be hard-coded.

Note that if you have multiple NPCs of the same colour in the room, only one will be made happy or sad - even if you use "all". My experimentation hasn't uncovered a solution, unfortunately. It's definitely worth knowing that once happy, they stay happy even if you leave the room and come back. However, multiple NPCs of the same colour in DIFFERENT rooms will all be affected by their corresponding command.

Happy and sad commands affect all NPCs, even in different rooms. If you use no argument or cyan / viridian, if you've got a cyan NPC, both will change if you're in different rooms. The NPC will change alone if you're in the same room. So again, to ensure it's just the player that changes, use e.g. happy(me). If you've got two cyan NPCs in different rooms and you're in one of their rooms, and a script there contains sad, then both cyan NPCs will become sad and the player will be unaffected. If you're in a different room, all three of you will become sad.

I think that about covers it. Any questions? Sorry if I overcomplicated things...

EDIT again: Just to point out that it's safe to have a 2.0 exe in the main folder of a 2.1 install. I haven't noticed any problems; the extra 2.1-exclusive stuff in the save files is left alone by v2.0 it seems. Any player levels you complete with 2.0 won't be starred when you load v2.1, but the levels already starred will still be starred. I copied my original v2.0 into the folder and called it VVVVVV20.exe along with the main vvvvvv.exe which is 2.1.

EDIT 3: OK, happy and sad commands affect all crewmembers of a certain colour, just not all straight away if there's more than one on the screen. For example, say you've got three cyan and three red in a row; happy(all) will only affect the player, the first cyan and the first red crewmember (in terms of when you placed them; if you placed them middle, left, right then it's the middle that will be affected), but when you leave the screen and come back, they will all be happy. Same goes for picking a colour; the first will be affected on the screen you're on, but they'll all be affected once you leave the screen.
Title: Re: Script commands index and tips
Post by: avengah on November 20, 2012, 12:02:13 PM
The second argument in the say command also accepts a number, but it does not accept all. As before, 1 = NPC Viridian (or player if no NPC present), 2 = Violet, 3 = Vitellary, 4 = Vermilion, 5 = Verdigris, 6 = Victoria, 0 / 7+ / everything else = repeats last colour used. There is no grey command, so load another script if you need grey after a different colour.

To ensure your box appears over the player, not NPC Viridian, use reply, not say. To summarise, you can use say(1,3) for one yellow line of text.
Title: Re: Script commands index and tips
Post by: avengah on November 20, 2012, 08:13:25 PM
Also, "all" works too. It affects everyone on screen, player and NPCs alike.

 :o I think that nobody mentioned that before, which makes me think that nobody discovered that before!

Oh, and FIQ, you still didn't wrote about squeak(on/off/crewmate). I wonder if squeak(all) works.

Yes, it was already known - check the featured level "Quantum Tunnel". The script "intro2" uses happy(all). Now that you mention "squeak", I'll test it out a bit.

OK, so squeak commands are local to the current script; that we know. Now then, squeak(off) disables ALL text box noises caused by say and reply for the current script. squeak(on) reverses this and is the normal behaviour.

The only other arguments that are accepted are 1-6, colours, crew names, player and sad. Not terminal, and not all. The numbers are the same as above, and both pink and purple work for Violet. So squeak(sad) makes the sad/death noise without making anyone actually sad, and player = cyan = viridian = 1; there's no difference this time.

Any other arguments are completely ignored. For example,

If anyone forgets the numbers, there are two ways to remember - when you create a crewman in the editor, start at cyan; this is 1. Every click to change its colour increases its number by 1, up to 6.

The second way, which I forgot to mention before, is to look at the order of the crew in the main game. When you pause the game and check the crew roster (saved, missing etc.) they're numbered like this:

14
25
36

Finally, squeak without an argument defaults to cyan / player. squeak(off) disables automatic squeaks from terminals and characters, but does not disable manual squeaks created with the squeak command. And squeak(off) only lasts as long as the current script.
Title: Re: Script commands index and tips
Post by: avengah on November 20, 2012, 10:18:52 PM
Now, something important about the say command. Do not assume that if you use no argument, you will get grey. We already know that it defaults to the previous colour used, but I've just discovered that it defaults to the NEXT colour used if no argument is specified! This is... strange.

So, the following script:

say
1
reply
2
say
3
say(1,2)
4

will produce 1, 3 and 4 all in pink, with 2 in cyan. Let's say you're using a terminal and you want output from the terminal, but you also want commentary from Violet. Then you must specify an unrecognised argument.

say(1,0)
1
reply
2
say
3
say(1,2)
4

That will do the trick. Now, it'll be grey, cyan, grey, pink in that order. I honestly don't know why the scripting system works like that - surely, if your third or fourth say command specifies a colour, then you want that command to be that colour; not all the commands before it too! Still, it is how it is, and we must use workarounds.

If anyone's had their text appear the wrong colour in custom levels, this could be why.

EDIT: New discovery about happy and sad - if you specify an individual number, colour or name, no matter what it is, the player will be affected if there is no crewman of that colour on the screen. Even if there is, say, a red crewmember over somewhere else in the level, if you do sad(red) then the player will become sad if there's no red crew on the current screen. The red crew elsewhere will also become sad.

So therefore, the fact that specifying cyan prioritises NPCs, then the player if no cyan NPCs are on screen, is not exclusive to the cyan argument. It applies to every colour; in addition to the matching NPCs elsewhere in the level, the player will be affected if there isn't a matching NPC on the current screen.
Title: Re: Script commands index and tips
Post by: FIQ on March 23, 2013, 08:32:56 PM
Corrected a few typos.

Also, I think this topic is worth a bump.
Title: Re: Script commands index and tips
Post by: FIQ on June 26, 2013, 07:23:24 AM
Added a note about flag 67.
Title: Re: Script commands index and tips
Post by: Dav999 on June 27, 2013, 01:38:15 AM
* Amount of script lines max before VVVVVV crashes if you try to run it: 198

Are you sure this is correct? I made the full map of tOLP show up with two scripts, both containing 200 showcoordinates(x,y) for both halves of the map, and text(1,0,0,4) say(5) every time, and it worked perfectly. Maybe it's just the amount of converted lines...
Title: Re: Script commands index and tips
Post by: weee50 on July 07, 2013, 06:14:39 AM
Flags is only 1-99? I thought it went to 100? Have to test this one...
I know this post is a year old, but they are not 1-99 nor 1-100, but they are actually 0-99!
Title: Re: Script commands index and tips
Post by: blue626 on July 19, 2013, 08:46:45 AM
Small bump.
I think it's a good idea to mention which scripts activate cutscene bars and which make :viridian: stop.
We already know that say and reply create cutscene bars and make  :viridian: stop. And, from how the script that makes scripts only execute once works, we know that iftrinkets (as well as ifflag) don't make Viridian stop (or create cutscene bars).
Delay doesn't create cutscene bars but does make Viridian stop (until it ends, I suppose). I suppose if it isn't executed, even though the script that contains it is entered, it doesn't make Viridian stop.
Flash, destroy and music don't make Viridian stop nor create cutscene bars. I suppose it's the same for happy, sad, map and squeak?
It may be a good idea to write about this because people may not know what this script does:

delay(60)
flash

(It obviously includes an empty line).
It doesn't just make a flash effect around 2 seconds (60 ticks) after it's activated. What it does is make :viridian: stop for around 2 seconds, as soon as it's activated, and then make a flash effect.

Another thing: I read somewhere someone saying that, in the method to execute scripts only once, the stop script doesn't need to exist. I removed that script in my level and then executed a script which I didn't modify or even seen for a long time. IIRC, it had the method to execute scripts only once shown here. It worked! It worked normally the first time, left the room, reentered and it didn't do anything the 2nd time.
Title: Re: Script commands index and tips
Post by: FIQ on July 19, 2013, 02:34:31 PM
Small bump.
I think it's a good idea to mention which scripts activate cutscene bars and which make :viridian: stop.
We already know that say and reply create cutscene bars and make  :viridian: stop. And, from how the script that makes scripts only execute once works, we know that iftrinkets (as well as ifflag) don't make Viridian stop (or create cutscene bars).
Delay doesn't create cutscene bars but does make Viridian stop (until it ends, I suppose). I suppose if it isn't executed, even though the script that contains it is entered, it doesn't make Viridian stop.
Flash, destroy and music don't make Viridian stop nor create cutscene bars. I suppose it's the same for happy, sad, map and squeak?
It may be a good idea to write about this because people may not know what this script does:

delay(60)
flash

(It obviously includes an empty line).
It doesn't just make a flash effect around 2 seconds (60 ticks) after it's activated. What it does is make :viridian: stop for around 2 seconds, as soon as it's activated, and then make a flash effect.

Another thing: I read somewhere someone saying that, in the method to execute scripts only once, the stop script doesn't need to exist. I removed that script in my level and then executed a script which I didn't modify or even seen for a long time. IIRC, it had the method to execute scripts only once shown here. It worked! It worked normally the first time, left the room, reentered and it didn't do anything the 2nd time.
I got issues when I didn't have that script once, but perhaps it was unrelated.
Title: Re: Script commands index and tips
Post by: blue626 on August 02, 2013, 06:13:11 AM
OK, I think a glitch that was discovered long ago and that is mentioned in the middle of the internal scripts thread needs to be mentioned here.
The glitch is that if you load a script from iftrinkets or ifflag, the last line of the script is copied to the top, and is executed as an internal command the first time. The last line is actually the second last line, as it doesn't see the last line (that's also why you need a blank line at the end of every script).
That causes problems with the commands ifflag or iftrinkets, like mentioned there (http://distractionware.com/forum/index.php?topic=1089.420).

However, there are other cases in which that's a problem. Consider this set of scripts:

Code: (script1) [Select]
ifflag(2,script2)
flag(2,on)
Code: (script2) [Select]
ifflag(3,script3)
flag(3,on)
Code: (script3) [Select]
ifflag(4,script4)
flag(4,on)
Code: (script4) [Select]
destroy(gravitylines)
All of them have one empty line in the end.
Consider that flags 2-4 are off every time you trigger it.
As you see, what it does is destroy gravity lines as soon as script1 is executed the 4th time.
However, it destroys them at the 2nd time. It's related to the glitch mentioned before.

What happens the first time it's triggered:
Checks for flag 2, sees that it's off and doesn't go to the other script and turn it on.
What happens the 2nd time:
Checks for flag 2, sees that it's on and goes to script2.
In there, because of the glitch, turns flag 3 on first and then check for flag 3. [edit]Oh, and that's because flag(x,on/off) works the same in internal scripting.[/edit] Sees it's on and goes to script3.
In there, the same thing happens (except it's flag 4).
In script4, gravity lines are destroyed.

How to fix it? It's simple:
Just add a second empty line in scripts script2 and script3. That way, the first empty line is considered the last line.

I think this should be added to the tips...
Title: Re: Script commands index and tips
Post by: weee50 on August 04, 2013, 03:06:00 PM
If someone, using 2.1 beta, plays a level made in 2.0, does that person see the map? If the answer is yes, I must ask this: does the command map(on/off) create any glitches in 2.0?

EDIT: In the "some scripting commands" thread (see my 1st post above) someone mentioned a way to make scripts execute only once:

What is the command to destroy a script box after it's used?
There isn't one.  You have to use what I call "trigger scripts", or secondary scripts, that use ifflags to make sure a script doesn't run twice.  It's kind of a pain, and one of the reasons my level is taking so long to make.  Example of what I do:

Example script: "talking1trigger"
Code: [Select]
ifflag(1,talking1)
end()

Example script: "talking1"
Code: [Select]
say(2)
this script will
only run once!
flag(1,off)
end()

This assumes the flag used was turned "on" previously.

This method uses 2 scripts and 1 flag per terminal/script box and an "init" script. The method I suggested uses 2 scripts and 1 flag per terminal/script box and a "stop" script. The method on this quote is as good as the other one. Note: I think that the "end" commands aren't necessary.
You can also use:
Code: [Select]
script1:
...
ifflag(1,stop)
...
flag(1,on)

stop:
say(-1)
text(1,0,0,4)
say(4)
endtext
endcutscene()
untilbars()
loadscript(stop)
to do it if the flag is still off.

(replace ... with the script code that you want)
Title: Re: Script commands index and tips
Post by: blue626 on August 07, 2013, 05:03:19 AM
You can also use:
Code: [Select]
script1:
...
ifflag(1,stop)
...
flag(1,on)
to do it if the flag is still off.

(replace ... with the script code that you want)

That would only work if the first "..." contains say/reply commands. Otherwise, cutscene bars would stay after triggering the 2nd time.
Thus, that's different from the script you quoted and the one in the OP. That one executes both "..."s the 1st time and only the 1st "..." in the next times. The other 2 scripts execute the script itself the first time and then nothing the following times.
And now that we're speaking about this, there's another way to execute scripts only once that was mentioned sometime ago:

Code: (script1) [Select]
ifflag(1,stop)
flag(1,on)
iftrinkets(0,script2)

script2 being the script itself without adding anything.
This is actually the same as in the OP, except that the flag is activated before the script itself is executed.
Notice that in this case, replacing iftrinkets with ifflag(1,script2) wouldn't change anything, making it equal to a method that was mentioned long time ago.... turns out iftrinkets(0,script) isn't necessary here after all.
Title: Re: Script commands index and hints
Post by: SteveGamer68 on July 01, 2016, 10:31:10 PM
Can you make a internal scripting version
Title: Re: Script commands index and hints
Post by: Starspire on July 01, 2016, 10:50:35 PM
You've been making meaningless bumps since your registration, so I'm banning you for a day.
Title: Re: Script commands index and hints
Post by: Dav999 on July 02, 2016, 04:00:41 AM
I'm not really sure if this bump was so meaningless...
Title: Re: Script commands index and hints
Post by: shiny k on July 02, 2016, 09:03:24 AM
no it was
Title: Re: Script commands index and hints
Post by: Dav999 on July 02, 2016, 09:55:48 AM
I still tend to disagree. Granted, an internal scripting topic already exists, but the post still isn't too unrelated to the topic. Maybe this is a bit of a gray area, but I would've simply linked him to that and be done with it instead of calling the post meaningless and banning him.

Edit: Lifted the ban, it has been in place for 14 hours.
Title: Re: Script commands index and hints
Post by: SomeRandomCreator on July 26, 2016, 04:17:36 PM
How much corruption does your level get if you use a colon (:) ?
I used one and saved with realizing.
Title: Re: Script commands index and hints
Post by: Viridan on July 26, 2016, 04:41:13 PM
it just creates a new script that you need to merge with the old one. for example, your script should be stored like this:

Quote
examplescript:
say(1)
this dialogue contains an: unexpected character!

but due to the colon, a new script is created:

Quote
examplescript:
say(1)

this dialogue contains an:
 unexpected character!

in this case, you just need to delete the script called "this dialogue contains an" and rewrite the dialogue to not contain any colons.
Title: Re: Script commands index and hints
Post by: SomeRandomCreator on July 27, 2016, 07:48:35 AM
Oh, THAT explains the problem I had before, and whew! I thought it was a huge problem.
Title: Re: Script commands index and hints
Post by: lol...ipops2 on July 27, 2016, 09:31:30 AM
it just creates a new script that you need to merge with the old one. for example, your script should be stored like this:

Quote
examplescript:
say(1)
this dialogue contains an: unexpected character!

but due to the colon, a new script is created:

Quote
examplescript:
say(1)

this dialogue contains an:
 unexpected character!

in this case, you just need to delete the script called "this dialogue contains an" and rewrite the dialogue to not contain any colons.
Terry should fix this.
Title: Re: Script commands index and hints
Post by: Dav999 on July 27, 2016, 11:26:02 AM
Not possible without changing the level format and breaking every level, unless the script editor adds a space after colons at ends of lines automatically, which I'm going to do in Ved
Title: Re: Script commands index and tips
Post by: Xdroid19 on June 17, 2017, 05:04:40 PM
I tried using a command where :viridian: said something one time. I used this command.
Quote
ifflag(1,speechb)
end()

and "speechb" was
Quote
reply(1)
Yet another dimension to be explored.
sad
reply(1)
*sigh*
reply(1)
And more spikes!
flag(1,off)


When I run this script  :viridian: does nothing.
How do I fix this?
Title: Re: Script commands index and hints
Post by: uugr on June 17, 2017, 07:12:36 PM
Do you have a separate script where flag 1 turns on? For that script to run, you'd need a separate script with
Quote
flag(1,on)
in it for the script to load.

(Also, putting 'end()' at the end of a script is unnecessary; the script will end on its own regardless.)
Title: Re: Script commands index and tips
Post by: Bruce Michez on June 17, 2017, 09:30:43 PM
I tried using a command where :viridian: said something one time. I used this command.
Quote
ifflag(1,speechb)
end()

and "speechb" was
Quote
reply(1)
Yet another dimension to be explored.
sad
reply(1)
*sigh*
reply(1)
And more spikes!
flag(1,off)


When I run this script  :viridian: does nothing.
How do I fix this?

You're better off doing it the other way round:

Code: [Select]
ifflag(1,donothing)
iftrinkets(0,speechb)

and in script "speechb":
Code: [Select]
flag(1,on).
Script "donothing" should of course be empty.
Title: Re: Script commands index and hints
Post by: AllyTally ♡ on June 18, 2017, 02:31:52 PM
I usually do

ifflag(1,blank)
flag(1,on)
iftrinkets(0,speechb)

also, in this case blank doesnt exist, or in yours, donothing doesnt have to exist
Title: Re: Script commands index and hints
Post by: Xdroid19 on December 19, 2017, 02:59:43 PM
Do you have a separate script where flag 1 turns on? For that script to run, you'd need a separate script with
Quote
flag(1,on)
in it for the script to load.
If i put a script where flag 1 turned on i might run over them both a second time and end up doing the same thing again (and i have already tried that) but thanks.
Title: Re: Script commands index and hints
Post by: Xdroid19 on December 19, 2017, 03:15:07 PM
I tried using a command where :viridian: said something one time. I used this command.
Quote
ifflag(1,speechb)
end()

and "speechb" was
Quote
reply(1)
Yet another dimension to be explored.
sad
reply(1)
*sigh*
reply(1)
And more spikes!
flag(1,off)


When I run this script  :viridian: does nothing.
How do I fix this?

You're better off doing it the other way round:

Code: [Select]
ifflag(1,donothing)
iftrinkets(0,speechb)

and in script "speechb":
Code: [Select]
flag(1,on).
Script "donothing" should of course be empty.
I usually do

ifflag(1,blank)
flag(1,on)
iftrinkets(0,speechb)

also, in this case blank doesnt exist, or in yours, donothing doesnt have to exist
Thank you both so much but now i have another problem
Code: [Select]
ifcrewmates(4,grav_lines)
and grav_lines was
Code: [Select]
destroy(gravitylines)
Title: Re: Script commands index and hints
Post by: AllyTally ♡ on December 19, 2017, 03:25:20 PM
ifcrewmates doesnt exist
Title: Re: Script commands index and hints
Post by: Xdroid19 on December 20, 2017, 07:41:26 AM
then what's the command in 333333?
Title: Re: Script commands index and hints
Post by: AllyTally ♡ on December 20, 2017, 12:00:17 PM
they probably put a script box infront of every crewmate, which raises a flag or something
Title: Re: Script commands index and hints
Post by: Xdroid19 on December 21, 2017, 05:47:02 AM
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOHHHHH
Title: Re: Script commands index and hints
Post by: AllyTally ♡ on December 21, 2017, 11:28:16 AM
same
Title: Re: Script commands index and hints
Post by: Xdroid19 on December 23, 2017, 08:45:25 AM
I had to use 16 scripts to do that
 :P
Title: Re: Script commands index and hints
Post by: MJKhoi on February 24, 2018, 01:46:20 PM
music(N)
Changes the music ingame to track N.
Usage:
N - a number between 0 and 11, which means the following:
0 - Silence (no music)
1 - Pushing onwards
2 - Positive force
3 - Potential for anything
4 - Passion for exploring
5 - Presenting VVVVVV
6 - Predestined fate
7 - Popular potpurri
8 - Pipe dream
9 - Pressure cooker
10 - Paced energy
11 - Piercing the sky
Example: music(4)
Where's ecrof evitisoP?
Title: Re: Script commands index and hints
Post by: Dav999 on February 24, 2018, 03:07:19 PM
It wasn't made available in the shorter list of songs for music(N), but you can trick VVVVVV by using it with 9a.

That way you can also play Path Complete (0a), Pause (5a), Plenary (7a).
Title: Re: Script commands index and hints
Post by: Info Teddy on June 03, 2018, 07:33:17 PM
fiq why did you change it from "tips" to "hints"
Title: Re: Script commands index and hints
Post by: Xandog01 on July 09, 2018, 11:11:48 AM
Flags don't work for me.  :'( What am I doing wrong?
Title: Re: Script commands index and hints
Post by: AllyTally ♡ on July 09, 2018, 04:29:22 PM
youre doing it wrong
and we cant help if you dont show us what you did
Title: Re: Script commands index and hints
Post by: Xandog01 on July 09, 2018, 04:48:55 PM
youre doing it wrong
and we cant help if you dont show us what you did
I do
(script1)
Quote
flag(1,on)
On 1 script,
and I do
(script2)
Quote
customifflag(1,script3)
(script3)
Quote
destroy(gravitylines)
Of course, in simplified scripting.
Title: Re: Script commands index and hints
Post by: Dav999 on July 09, 2018, 05:02:47 PM
customifflag is an internal command to load a script, try ifflag instead.
Title: Re: Script commands index and hints
Post by: Xandog01 on July 09, 2018, 07:53:39 PM
Oh...  :o
Title: Re: Script commands index and hints
Post by: KostaRotaev on July 11, 2018, 04:05:51 AM
Bewilder some script:

say(2)
This is a great computer
to compute the secure.

It's probably used it.
Title: Re: Script commands index and hints
Post by: Xandog01 on July 16, 2018, 05:58:26 AM
customifflag is an internal command to load a script, try ifflag instead.
What I didn't know before is that the internal commands and simplified commands were both on internal list, and I saw that ifflag was blue, and customifflag wasnt, so I was confused.
Title: Re: Script commands index and hints
Post by: Dav999 on July 16, 2018, 06:25:12 AM
Actually, ifflag is an internal command as well, it just loads scripts from the main game, so it's mostly useless compared to customifflag.
Title: i discovered this
Post by: Info Teddy on July 29, 2018, 09:15:11 AM
Actually, ifflag is an internal command as well, it just loads scripts from the main game, so it's mostly useless compared to customifflag.
you can load custom scripts with internal ifflag by prefixing them with custom_