Internal commands

Started by Hilbert, July 28, 2012, 01:23:29 PM

Previous topic - Next topic

ToasterApocalypse

Quote from: FIQ on November 21, 2012, 03:39:23 PM
Quote from: ToasterApocalypse on November 21, 2012, 03:02:58 PM
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:

Quote from: FIQ on November 20, 2012, 09:58:30 PM
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

gotoroom() doesn't work for me. Also how do I internal commands.

FIQ

Quote from: manofperson the movie the game 2 1/2 on December 02, 2012, 04:39:45 PM
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

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

How many commands can you use in an A)Say?

allison

Quote from: RoskillaHULK!! on December 08, 2012, 03:38:09 PM
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

Quote from: crazyal02 on December 08, 2012, 03:48:58 PM
Quote from: RoskillaHULK!! on December 08, 2012, 03:38:09 PM
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

#412
Quote from: Dav999 on December 08, 2012, 04:11:40 PM
Quote from: crazyal02 on December 08, 2012, 03:48:58 PM
Quote from: RoskillaHULK!! on December 08, 2012, 03:38:09 PM
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:

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)

(...)

avengah

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

Dav999

Quote from: avengah on December 09, 2012, 03:30:35 PM
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

#415
I was replying to FIQ's post above about translating simplified scripting into internal scripting.

FIQ

Quote from: avengah on December 09, 2012, 04:57:54 PM
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

I see... what about squeak(sad)?

Dav999


avengah

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.