Internal commands

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

Previous topic - Next topic

sv6z2

Quote from: Dav999 on January 04, 2013, 02:09:20 PM
Quote from: SolVVVVVVingPuzzles on January 04, 2013, 01:41:59 PM
Anyway, if you look into this level here then you can see the small pause that the game inserts:

So, are we talking about summittele and summittele2? You don't need to use iftrinkets(0,summittele2) if you use the say(-1) method. The say(-1) method creates cutscene bars though, and if you want to have that script without cutscene bars, you do need the iftrinkets(0,summittele2), and you have to remove the 'flash', 'say(-1)' and 'text(1,0,0,4)' at the beginning of summittele2 and insert 'text(1,0,0,4)' at the end, making sure that there is exactly one line after the last text(1,0,0,4). The flash can just be put in summittele, before iftrinkets(0,summittele2).

So this:

Code (summittele) Select
iftrinkets(0,summittele2)
Code (summittele2) Select
flash
say(-1)
text(1,0,0,4)
say(4)
gotoroom(3,15)
endcutscene
untilbars
loadscript(stop)



becomes this:

Code (summittele) Select
flash
iftrinkets(0,summittele2)

Code (summittele2) Select

say(4)
gotoroom(3,15)
endcutscene
untilbars
loadscript(stop)
text(1,0,0,4)


However, in summittele2, the endcutscene and untilbars can be removed now, because no cutscene bars were created in the first place (and say(4) has to be changed into say(2)):

Code (summittele2) Select

say(2)
gotoroom(3,15)
loadscript(stop)
text(1,0,0,4)


And that can also be:

Code (summittele2) Select
#
A)Say
gotoroom(3,15)


because you only want to use one command, namely gotoroom(3,15). So the end result is this:

Code (summittele) Select
flash
iftrinkets(0,summittele2)

Code (summittele2) Select
#
A)Say
gotoroom(3,15)


You are my hero. (Works)

sv6z2

This worked perfect:

Code (example1) Select
iftrinkets(0,example2)
Code (example2) Select
#
A)Say
[Internal]

Dav999

I put the method without cutscene bars in the first post, and I also made a vvvvvv level with those two methods, so people can see it in the editor.

And that post is REALLY long now. ::)

FIQ

You should make gamemode() blue. gamemode(teleporter) shows the map but it just shows the maingame map instead of the map custom levels get.

sv6z2

Quote from: FIQ on January 08, 2013, 03:08:13 AM
You should make gamemode() blue. gamemode(teleporter) shows the map but it just shows the maingame map instead of the map custom levels get.

Yeah, I've noticed that as well. I even used it in my level, The Colour Spiral, if you go down the
shaft at the Divot once you've got 3 trinkets you can activate the terminal which activates
room coords that were not used in the actual level for some reason. (room 10,10)

Dav999

Quote from: FIQ on January 08, 2013, 03:08:13 AM
You should make gamemode() blue. gamemode(teleporter) shows the map but it just shows the maingame map instead of the map custom levels get.

Done :)

Wow, 500 replies in this topic! :o

sv6z2

createentity() teleporters are safe to touch as long as you put activateteleporter() straight
after.

Hilbert

Quote from: Dav999 on January 08, 2013, 07:49:31 PM
Quote from: FIQ on January 08, 2013, 03:08:13 AM
You should make gamemode() blue. gamemode(teleporter) shows the map but it just shows the maingame map instead of the map custom levels get.

Done :)

Wow, 500 replies in this topic! :o
Wait, I thought a bunch of people posted after this? Seems like they all got deleted.

Dav999

Quote from: RoskillaHULK!! on January 13, 2013, 10:15:44 PM
Quote from: Dav999 on January 08, 2013, 07:49:31 PM
Quote from: FIQ on January 08, 2013, 03:08:13 AM
You should make gamemode() blue. gamemode(teleporter) shows the map but it just shows the maingame map instead of the map custom levels get.

Done :)

Wow, 500 replies in this topic! :o
Wait, I thought a bunch of people posted after this? Seems like they all got deleted.

You're right! From what I recall, there were two rather useless posts (the first one was VVHAT VVHAT VVHAT and the second one was just a quote).

Anyway, back on topic. That activateteleporter() can also be placed in a script next to the teleporter, so you can walk to the teleporter and make it look like you activated the teleporter by touching, just like in the main game. There's still one disadvantage: it looks like you're about to teleport. Teleporters have three states: gray/untouched, white/touched/game saved, and teleporting. activateteleporter() goes straight to teleporting.

FIQ

I tried, by utilizing game states, trick the game to turn off the autosaving behaviour by activating time trial mode. If you made this, you would be able to replicate the main game even more by having the real teleport system in place. However it didn't do what I want.

Dav999

Quote from: FIQ on January 13, 2013, 11:32:19 PM
I tried, by utilizing game states, trick the game to turn off the autosaving behaviour by activating time trial mode. If you made this, you would be able to replicate the main game even more by having the real teleport system in place. However it didn't do what I want.

What's the behavior of teleporters in time trial mode? Time trials stop before reaching the final teleporter in a level, and the mid-level one in the lab is gone. So, is there anything else which can stop the game from saving? (Like corrupting something somewhere in the level which the game detects so it triggers a 'could not save' sort of thing? I guess not. :D)

FIQ

Quote from: Dav999 on January 13, 2013, 11:44:14 PM
Quote from: FIQ on January 13, 2013, 11:32:19 PM
I tried, by utilizing game states, trick the game to turn off the autosaving behaviour by activating time trial mode. If you made this, you would be able to replicate the main game even more by having the real teleport system in place. However it didn't do what I want.

What's the behavior of teleporters in time trial mode? Time trials stop before reaching the final teleporter in a level, and the mid-level one in the lab is gone. So, is there anything else which can stop the game from saving? (Like corrupting something somewhere in the level which the game detects so it triggers a 'could not save' sort of thing? I guess not. :D)
Now that you mention it, Time Trial maybe doesn't really stop saving. I however know that level replay and no death DO stop saving. However, none of these are accessible within the scripting language (even the internal one).

Chillius

Quote from: Dav999 on September 28, 2012, 10:09:28 PM
Quote from: blue626 on September 28, 2012, 05:25:59 PM
On-topic:

Shouldn't the definition of final mode(x,y) be changed? Or, do you mean it only works with final mode(46,54)? I guess it should work with other values, and that 46,54 is the room FIQ said to work, probably leading to Panic Room...

I've never tried finalmode, so I don't know what will happen if you use other coordinates.

it just takes you to the normal map

FIQ

finalmode() is just an equavilent of gotoroom() but takes you to the polar dimension.

Dav999

Okay, flipme and tofloor don't always work, but I discovered that you can just use 'flip' to flip either way, that always works. Why didn't anyone discover that earlier?