Author Topic: Internal scripting problems, things i didnt type showing up when its activated  (Read 4183 times)

Epsilon

  • Professor
  • ****
  • Posts: 139
  • (ʘ‿ʘ)
    • View Profile
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.

Doormat

  • Captain
  • *****
  • Posts: 501
    • View Profile
    • My hardly used YT account
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.

Epsilon

  • Professor
  • ****
  • Posts: 139
  • (ʘ‿ʘ)
    • View Profile
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.
« Last Edit: March 22, 2013, 10:02:26 PM by Kayya »

Doormat

  • Captain
  • *****
  • Posts: 501
    • View Profile
    • My hardly used YT account
gotoroom(x,y) does indeed take you to a room, you get an A+!
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!

Epsilon

  • Professor
  • ****
  • Posts: 139
  • (ʘ‿ʘ)
    • View Profile
gotoroom(x,y) does indeed take you to a room, you get an A+!
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
« Last Edit: March 22, 2013, 10:02:11 PM by Kayya »

Dav999

  • Global Moderator
  • Captain
  • *****
  • Posts: 2167
    • View Profile
    • The Open Level Project
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?

Doormat

  • Captain
  • *****
  • Posts: 501
    • View Profile
    • My hardly used YT account
Or, [internal command].

Dav999

  • Global Moderator
  • Captain
  • *****
  • Posts: 2167
    • View Profile
    • The Open Level Project
Combined the two and changed it to {internal command} instead.

Epsilon

  • Professor
  • ****
  • Posts: 139
  • (ʘ‿ʘ)
    • View Profile
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: