Author Topic: Internal commands  (Read 261442 times)

ToasterApocalypse

  • Captain
  • *****
  • Posts: 1010
  • le lenny face
    • View Profile
Re: Internal commands
« Reply #405 on: November 21, 2012, 08:23:37 AM »
I got bored and destroyed my telesave by creating a teleporter at co-ordinates: (10,20)
I got stuck in a wall at the end of the tower  :viridian:

Toaster: gotoposition() w/o 3rd parameter behaves incorrectly in some cases.

But with the third parameter? Does it work then?
It should behave correctly then.

Awesome! +1 level mechanic for me!

Pyrite

  • Captain
  • *****
  • Posts: 329
  • New name who dis
    • View Profile
    • http://you.ar/a/nidi/ot.shtml
Re: Internal commands
« Reply #406 on: December 02, 2012, 08:39:45 AM »
gotoroom() doesn't work for me. Also how do I internal commands.

FIQ

  • Captain
  • *****
  • Posts: 811
  • https://github.com/FredrIQ/
    • View Profile
    • FIQ
Re: Internal commands
« Reply #407 on: December 02, 2012, 09:07:46 AM »
gotoroom() doesn't work for me. Also how do I internal commands.
say(-1)
text(1,0,0,4)
say(4)
gotoroom(3,3)
endcutscene()
untilbars()
loadscript(stop)

Dav999

  • Global Moderator
  • Captain
  • *****
  • Posts: 2173
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #408 on: December 02, 2012, 09:15:49 AM »
Or:

iftrinkets(0,gotoroom)

Then make a new script called gotoroom, and delete the terminal/script box you created it with. In that script, write:

#
A)Say
gotoroom(x,y)

This makes sure there's no terminal sound, and no cutscene bars.

Also, there's something very important about gotoroom which shouldn't be forgotten: the coordinates start at 0, instead of 1 like you see in the editor. So, if you want to go to room (4,9), you'll have to type gotoroom(3,8).

Hilbert

  • Captain
  • *****
  • Posts: 574
  • Yup. This is my name. Not Black, Hilbert.
    • View Profile
Re: Internal commands
« Reply #409 on: December 08, 2012, 07:38:09 AM »
How many commands can you use in an A)Say?

allison

  • Captain
  • *****
  • Posts: 924
  • monolithic since 2012??
    • View Profile
    • Allison Fleischer
Re: Internal commands
« Reply #410 on: December 08, 2012, 07:48:58 AM »
How many commands can you use in an A)Say?

Because of the way they work, you can use one simplified command and one internal command.

Dav999

  • Global Moderator
  • Captain
  • *****
  • Posts: 2173
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #411 on: December 08, 2012, 08:11:40 AM »
How many commands can you use in an A)Say?

Because of the way they work, you can use one simplified command and one internal command.

Actually, you can use multiple simplified commands, and on the last two lines you write 'A)Say' and the internal command you want to use. Strangely enough, the internal command will always run first, then the simplified commands. You have to run the script from another script (with iftrinkets(0,asayscript)), and there should be exactly one empty line at the end of the script, not 0, because your internal command will be deleted, and also not 2, because then it doesn't work for some reason. If you don't want to use simplified commands, you can write # on the first line, or something similar. I'm not sure if it works with A)Say on the first line.

FIQ

  • Captain
  • *****
  • Posts: 811
  • https://github.com/FredrIQ/
    • View Profile
    • FIQ
Re: Internal commands
« Reply #412 on: December 08, 2012, 09:13:34 AM »
How many commands can you use in an A)Say?

Because of the way they work, you can use one simplified command and one internal command.

Actually, you can use multiple simplified commands, and on the last two lines you write 'A)Say' and the internal command you want to use. Strangely enough, the internal command will always run first, then the simplified commands. You have to run the script from another script (with iftrinkets(0,asayscript)), and there should be exactly one empty line at the end of the script, not 0, because your internal command will be deleted, and also not 2, because then it doesn't work for some reason. If you don't want to use simplified commands, you can write # on the first line, or something similar. I'm not sure if it works with A)Say on the first line.
It does work without a simplified command at first line, but only sometimes, is my experience. Also, once when I did "#" to run no simplified command at all, it failed for some reason. I changed so it ran ifflag(glitch) (which essentially does nothing), and then it worked.

Keep in mind that you CAN run multiple internal commands with the method, but you're limited to one line per script. An example from my own level:

Code: [Select]
showtrinkets:
iftrinkets(0,showtrinkets1)

showtrinkets1:
iftrinkets(1,showtrinkets2)
A)Say
createentity(136,80,22,1,0)

showtrinkets2:
iftrinkets(1,showtrinkets3)
A)Say
createentity(112,80,22,2,0)

(...)
« Last Edit: December 08, 2012, 09:17:14 AM by FIQ »

avengah

  • Professor
  • ****
  • Posts: 117
    • View Profile
Re: Internal commands
« Reply #413 on: December 09, 2012, 07:30:35 AM »
Are you absolutely sure about the squeak command? Try testing it with colours/crewmates and sad. See what happens then.

Accepted arguments are 1-6, colours, crewmate names, player, sad, on, off.
« Last Edit: December 09, 2012, 07:34:58 AM by avengah »

Dav999

  • Global Moderator
  • Captain
  • *****
  • Posts: 2173
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #414 on: December 09, 2012, 07:52:45 AM »
Are you absolutely sure about the squeak command? Try testing it with colours/crewmates and sad. See what happens then.

Accepted arguments are 1-6, colours, crewmate names, player, sad, on, off.

I think you're talking about the simplified squeak. The internal squeak is different. (And this topic is about internal commands)

avengah

  • Professor
  • ****
  • Posts: 117
    • View Profile
Re: Internal commands
« Reply #415 on: December 09, 2012, 08:57:54 AM »
I was replying to FIQ's post above about translating simplified scripting into internal scripting.
« Last Edit: December 09, 2012, 08:59:53 AM by avengah »

FIQ

  • Captain
  • *****
  • Posts: 811
  • https://github.com/FredrIQ/
    • View Profile
    • FIQ
Re: Internal commands
« Reply #416 on: December 09, 2012, 10:06:07 AM »
I was replying to FIQ's post above about translating simplified scripting into internal scripting.

squeak(crewmate/color) --> squeak(color)

UNLESS you use squeak(on) or squeak(off). This is not converted to any internal command at all, but is instead removed, and a variable is set that makes (simplified) dialogs quiet. Don't use squeak(on|off) with internal commands unless you know this -- as it will require a work-around due to the fact that it makes 2.1 need text(1,0,0,3) while 2.0 still needs text(1,0,0,4). See page 4 for a more elaborate post on this topic.

avengah

  • Professor
  • ****
  • Posts: 117
    • View Profile
Re: Internal commands
« Reply #417 on: December 09, 2012, 10:20:28 AM »
I see... what about squeak(sad)?

Dav999

  • Global Moderator
  • Captain
  • *****
  • Posts: 2173
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #418 on: December 09, 2012, 10:27:42 AM »
I see... what about squeak(sad)?

squeak(cry).

avengah

  • Professor
  • ****
  • Posts: 117
    • View Profile
Re: Internal commands
« Reply #419 on: December 10, 2012, 05:56:36 AM »
Really? That's the internal version of squeak(sad)? Seems a bit strange. I thought it would be converted to a playef command or something.