Author Topic: Internal commands  (Read 256806 times)

Hennal

  • Doctor
  • ***
  • Posts: 93
    • View Profile
Re: Internal commands
« Reply #495 on: January 04, 2013, 07:02:02 AM »
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)

Hennal

  • Doctor
  • ***
  • Posts: 93
    • View Profile
Re: Internal commands
« Reply #496 on: January 04, 2013, 07:11:29 AM »
This worked perfect:

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

Dav999

  • Global Moderator
  • Captain
  • *****
  • Posts: 2173
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #497 on: January 07, 2013, 10:43:51 AM »
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

  • Captain
  • *****
  • Posts: 810
  • https://github.com/FredrIQ/
    • View Profile
    • FIQ
Re: Internal commands
« Reply #498 on: January 07, 2013, 07:08:13 PM »
You should make gamemode() blue. gamemode(teleporter) shows the map but it just shows the maingame map instead of the map custom levels get.

Hennal

  • Doctor
  • ***
  • Posts: 93
    • View Profile
Re: Internal commands
« Reply #499 on: January 08, 2013, 09:33:09 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

  • Global Moderator
  • Captain
  • *****
  • Posts: 2173
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #500 on: January 08, 2013, 11:49:31 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

Hennal

  • Doctor
  • ***
  • Posts: 93
    • View Profile
Re: Internal commands
« Reply #501 on: January 13, 2013, 02:45:53 AM »
createentity() teleporters are safe to touch as long as you put activateteleporter() straight
after.

Hilbert

  • Captain
  • *****
  • Posts: 574
  • Yup. This is my name. Not Black, Hilbert.
    • View Profile
Re: Internal commands
« Reply #502 on: January 13, 2013, 02:15:44 PM »
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

  • Global Moderator
  • Captain
  • *****
  • Posts: 2173
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #503 on: January 13, 2013, 02:59:12 PM »
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

  • Captain
  • *****
  • Posts: 810
  • https://github.com/FredrIQ/
    • View Profile
    • FIQ
Re: Internal commands
« Reply #504 on: January 13, 2013, 03: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.

Dav999

  • Global Moderator
  • Captain
  • *****
  • Posts: 2173
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #505 on: January 13, 2013, 03:44:14 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

  • Captain
  • *****
  • Posts: 810
  • https://github.com/FredrIQ/
    • View Profile
    • FIQ
Re: Internal commands
« Reply #506 on: January 13, 2013, 03:54:09 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

  • Captain
  • *****
  • Posts: 451
  • I'm back.
    • View Profile
Re: Internal commands
« Reply #507 on: January 17, 2013, 10:52:52 AM »
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

  • Captain
  • *****
  • Posts: 810
  • https://github.com/FredrIQ/
    • View Profile
    • FIQ
Re: Internal commands
« Reply #508 on: January 17, 2013, 12:18:10 PM »
finalmode() is just an equavilent of gotoroom() but takes you to the polar dimension.

Dav999

  • Global Moderator
  • Captain
  • *****
  • Posts: 2173
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #509 on: January 20, 2013, 12:16:24 PM »
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?