distractionware forums

Archived => VVVVVV Tech Support => Topic started by: Epsilon on March 23, 2013, 02:59:27 am

Title: Internal scripting problems, things i didnt type showing up when its activated
Post by: Epsilon on March 23, 2013, 02:59:27 am
Im new to internal scripting, all I can do is change the player colour but even THAT i have a problem with.
In room 1, It changes Viridian to Vermilion, but a textbox with "position(center) | squeak_active | squeak(terminal) text(grey,0,114,2" and "endtext | loadscript(stop)" appears. Same for the one where its supposed to be red text (i heard that doesnt really work...), and in the next room I tried to create a green (unrescuable?) happy crewmate but it didnt do anything but show the code. If any Internal Scripters can tell me what I'm doing wrong, it'll be appreciated.
The download is attached to this post.
Im using the "Iftrinkets" method, should that be of any help.
Title: Re: Internal scripting problems, things i didnt type showing up when its activated
Post by: Stelpjo on March 23, 2013, 03:34:31 am
The first thing I noticed when I saw your scripts was that you wrote a bunch of [internal]s.
In the internal commands topic, the [internal]s represented internal commands. You don't actually type in [internal].
say(2)
changeplayercolour(red)
say(5)
...

Uhmmm this doesn't look right. You have to type in text(1,0,0,4) after the changeplayercolour command.
Internal scripting can be confusing (it sure was for me when I first tried it). If you want to use a single internal command, you can replace the entire script2 with
#
changeplayercolour(red)

This method works, I think, because that when iftrinkets(X,script) loads a script it copies the bottom line to the top of the script and executes it as an internal command. At least, that's what I've read.
This method is also handy for gotoroom(x,y)!

If you need further help, feel free to shoot me a PM.
Title: Re: Internal scripting problems, things i didnt type showing up when its activated
Post by: Epsilon on March 23, 2013, 04:09:13 am
The first thing I noticed when I saw your scripts was that you wrote a bunch of [internal]s.
In the internal commands topic, the [internal]s represented internal commands. You don't actually type in [internal].

The way Dav made it looked like you were supposed to type all that... Oh well.

Quote from: Doormat
say(2)
changeplayercolour(red)
say(5)
...

Uhmmm this doesn't look right. You have to type in text(1,0,0,4) after the changeplayercolour command.

That wasn't mentioned either, again with the way Dav wrote it.

Quote from: Doormat
Internal scripting can be confusing (it sure was for me when I first tried it). If you want to use a single internal command, you can replace the entire script2 with
#
changeplayercolour(red)

This method works, I think, because that when iftrinkets(X,script) loads a script it copies the bottom line to the top of the script and executes it as an internal command. At least, that's what I've read.

So a normal command is really an internal one? Cool.

Quote from: Doormat
This method is also handy for gotoroom(x,y)!

If you need further help, feel free to shoot me a PM.

What is gotoroom(x,y)? just a warp that takes you to the room with coordinates X and Y? If so, I may as well try it out.
Atleast I got it to change Viridians colour without having the textbox.
Title: Re: Internal scripting problems, things i didnt type showing up when its activated
Post by: Stelpjo on March 23, 2013, 04:15:02 am
gotoroom(x,y) does indeed take you to a room, you get an A+! (http://www.derekyu.com/images/art/pixel/fu-thumbsup.gif)
However, the coordinates in gotoroom(x,y) are different from the ones you see in the editor (the numbers start at 0 instead of 1), so in order to go to room 1,1 you'd type in gotoroom(0,0) and to go to room 14,6 you'd type in gotoroom(13,5). Also, you are always in the same place on the screen you were before using gotoroom as afterwards, so you should use gotoposition(x,y,z) after gotoroom but I'm too tired to expain right now. Again, PM me if anything seems confusing. And I'm glad you got it to work!
Title: Re: Internal scripting problems, things i didnt type showing up when its activated
Post by: Epsilon on March 23, 2013, 04:25:15 am
gotoroom(x,y) does indeed take you to a room, you get an A+! (http://www.derekyu.com/images/art/pixel/fu-thumbsup.gif)
However, the coordinates in gotoroom(x,y) are different from the ones you see in the editor (the numbers start at 0 instead of 1), so in order to go to room 1,1 you'd type in gotoroom(0,0) and to go to room 14,6 you'd type in gotoroom(13,5). Also, you are always in the same place on the screen you were before using gotoroom as afterwards, so you should use gotoposition(x,y,z) after gotoroom but I'm too tired to expain right now. Again, PM me if anything seems confusing. And I'm glad you got it to work!
YEAH A+!
And I guess the 'same position' thing makes sense, as it looks like you just got teleported somewhere else. :o
Title: Re: Internal scripting problems, things i didnt type showing up when its activated
Post by: Dav999 on March 23, 2013, 08:06:58 am
Internal scripting can be confusing (it sure was for me when I first tried it). If you want to use a single internal command, you can replace the entire script2 with
#
changeplayercolour(red)


I think you can even omit the first line, so 'changeplayercolour(red)' is the only line. You also have to make sure that there's exactly one blank line below it.

And writing all the [internal]s certainly wasn't necessary. Maybe I have to replace it with {internal} because you can't type that?
Title: Re: Internal scripting problems, things i didnt type showing up when its activated
Post by: Stelpjo on March 23, 2013, 02:41:20 pm
Or, [internal command].
Title: Re: Internal scripting problems, things i didnt type showing up when its activated
Post by: Dav999 on March 23, 2013, 03:34:16 pm
Combined the two and changed it to {internal command} instead.
Title: Re: Internal scripting problems, things i didnt type showing up when its activated
Post by: Epsilon on March 23, 2013, 05:31:06 pm
Didnt I lock this last night? Oh well, atleast Dav fixed his slight mistake. Now less people will do what I did! So I guess thank both of you, Doormat for helping me and Dav for making it less confusing for others.  :viridian: