Author Topic: Internal commands  (Read 261440 times)

Hilbert

  • Captain
  • *****
  • Posts: 574
  • Yup. This is my name. Not Black, Hilbert.
    • View Profile
Re: Internal commands
« Reply #60 on: August 12, 2012, 08:57:12 AM »
[quote author=Dav999 link=topic=1089.msg9085#msg9085 date=1344717382]
[quote author=blue626 link=topic=1089.msg9082#msg9082 date=1344700549]
Why did you change the color to black? Isn't it already black?
[/quote][left][color=white][color=limegreen][color=maroon][color=navy][color=teal][color=brown][color=beige][color=blue][color=purple][color=orange][color=green][color=pink][color=yellow][color=red][color=black][u][i][b][s]:P[/s][/b][/i][/u][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/left][left][color=black]Maybe he wanted to change the colour to something else and then realized it wasn't appropriate and change the text to 'black' instead of removing the tags.[/color][/left][left][color=black]This post however, contains huge amounts of useless layout tags which you don't notice until you quote because it doesn't change anything[/color][color=black] [/color][color=white][color=limegreen][color=maroon][color=navy][color=teal][color=brown][color=beige][color=blue][color=purple][color=orange][color=green][color=pink][color=yellow][color=red][color=black][u][i][b][s]:viridian:[/s][/b][/i][/u][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/left][left][color=black]Try to quote this post, it's a living hell to read it actually[/color][color=black] [/color][color=white][color=limegreen][color=maroon][color=navy][color=teal][color=brown][color=beige][color=blue][color=purple][color=orange][color=green][color=pink][color=yellow][color=red][color=black][u][i][b][s]:vermillion:[/s][/b][/i][/u][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/left][left][color=black]Time to get back on topic.[/color][/left]
[/quote]

Dav999

  • Global Moderator
  • Captain
  • *****
  • Posts: 2173
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #61 on: August 12, 2012, 09:23:15 AM »
That wasn't really necessary :victoria:

ToasterApocalypse

  • Captain
  • *****
  • Posts: 1010
  • le lenny face
    • View Profile
Re: Internal commands
« Reply #62 on: August 12, 2012, 09:56:42 AM »
[quote author=Dav999 link=topic=1089.msg9085#msg9085 date=1344717382]
[quote author=blue626 link=topic=1089.msg9082#msg9082 date=1344700549]
Why did you change the color to black? Isn't it already black?
[/quote][left][color=white][color=limegreen][color=maroon][color=navy][color=teal][color=brown][color=beige][color=blue][color=purple][color=orange][color=green][color=pink][color=yellow][color=red][color=black][u][i][b][s]:P[/s][/b][/i][/u][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/left][left][color=black]Maybe he wanted to change the colour to something else and then realized it wasn't appropriate and change the text to 'black' instead of removing the tags.[/color][/left][left][color=black]This post however, contains huge amounts of useless layout tags which you don't notice until you quote because it doesn't change anything[/color][color=black] [/color][color=white][color=limegreen][color=maroon][color=navy][color=teal][color=brown][color=beige][color=blue][color=purple][color=orange][color=green][color=pink][color=yellow][color=red][color=black][u][i][b][s]:viridian:[/s][/b][/i][/u][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/left][left][color=black]Try to quote this post, it's a living hell to read it actually[/color][color=black] [/color][color=white][color=limegreen][color=maroon][color=navy][color=teal][color=brown][color=beige][color=blue][color=purple][color=orange][color=green][color=pink][color=yellow][color=red][color=black][u][i][b][s]:vermillion:[/s][/b][/i][/u][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/left][left][color=black]Time to get back on topic.[/color][/left]
[/quote]

 :o

Dav999

  • Global Moderator
  • Captain
  • *****
  • Posts: 2173
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #63 on: August 12, 2012, 10:54:29 AM »
Yep, that's what you get after you quote my post on the previous page :P (assuming that everybody has set the default number of posts per page)

blue626

  • Captain
  • *****
  • Posts: 672
  • I changed my avatar!
    • View Profile
Re: Internal commands
« Reply #64 on: August 12, 2012, 11:43:29 AM »
2500-2509 - Perform a teleport to some weird non-existent location, supposedly to The FINAL LEVEL I guess, continue to state 2510

I guess you're right, considering gamestates 2510 and 2512.
I think that gamestate 2514 is wrong too:
2514 - Removes textboxes, play Potential For Anything Predestined Fate

Why did you change the color to black? Isn't it already black?
I just tried, it does play Potential For Anything.

But, aren't gamestates 2510 and 2512 the dialog at the beginning of the Final Level? Why does it play Potential for Anything, then? Have you tested gamestate 2509 again? Why do you think it teleports to the Lab?

I don't see any reason for the gaps in the gamestates' numbers. Sometimes gamestates skip one number (2510, 2512) sometimes they skip many numbers. I don't know almost anything about proggraming games (except VVVVVV scripting), so, it might be obvious that I don't know the reason. Perhaps you don't know it too.

FIQ

  • Captain
  • *****
  • Posts: 811
  • https://github.com/FredrIQ/
    • View Profile
    • FIQ
Re: Internal commands
« Reply #65 on: August 12, 2012, 11:53:37 AM »
2500-2509 - Perform a teleport to some weird non-existent location, supposedly to The FINAL LEVEL I guess, continue to state 2510

I guess you're right, considering gamestates 2510 and 2512.
I think that gamestate 2514 is wrong too:
2514 - Removes textboxes, play Potential For Anything Predestined Fate

Why did you change the color to black? Isn't it already black?
I just tried, it does play Potential For Anything.

But, aren't gamestates 2510 and 2512 the dialog at the beginning of the Final Level? Why does it play Potential for Anything, then? Have you tested gamestate 2509 again? Why do you think it teleports to the Lab?

I don't see any reason for the gaps in the gamestates' numbers. Sometimes gamestates skip one number (2510, 2512) sometimes they skip many numbers. I don't know almost anything about proggraming games (except VVVVVV scripting), so, it might be obvious that I don't know the reason. Perhaps you don't know it too.
No, I don't.

And it IS playing Potential For Anything. Try for yourself


say(-1)
text(1,0,0,4)
say(4)
gamestate(2514)
endcutscene
untilbars
loadscript(stop)


About teleporting, if I say that it teleports to somewhere, I'm pretty confident in it. Just create a 20x20 custom level map and test the game state, and see where teleports go, etc.

And no, I've no idea why gamestates occasionally skip numbers. It's just the way it is.

Dav999

  • Global Moderator
  • Captain
  • *****
  • Posts: 2173
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #66 on: August 12, 2012, 01:03:37 PM »
Quote
102 - Verdigris: "Captain! I've been so worried!"
104 - "I'm glad you're ok!"
106 - "I've been trying to find a way out, but I keep going around in circles…"
108 - "Don't worry! I have a teleporter key!"
110 - "Follow me!"

102, 104, 106, 108, 110 are dialogs, so maybe 103, 105, 107, 109 and 111 are endtexts?
Like this:

Gamestate 102:
Code: [Select]
squeak(green)
text(green,0,0,1)
Captain! I've been so worried!
position(green,above)
speak_active

Gamestate 103:
Code: [Select]
endtext
Gamestate 104:
Code: [Select]
squeak(player)
text(cyan,0,0,1)
I'm glad you're ok!
position(player,above)
speak_active

Gamestate 105:
Code: [Select]
endtext
Gamestate 106:
Quote
squeak(green)
text(green,0,0,3)
I've been trying to find a
way out, but I keep going
around in circles...
position(green,above)
speak_active

Gamestate 107:
Code: [Select]
endtext
Gamestate 108:
Code: [Select]
squeak(player)
text(cyan,0,0,2)
Don't worry! I have a
teleporter key!
position(player,above)
speak_active

Gamestate 109:
Code: [Select]
endtext
Gamestate 110:
Code: [Select]
squeak(player)
text(cyan,0,0,1)
Follow me!
position(player,above)
speak_active

Gamestate 111:
Code: [Select]
endtext
But why split all these dialogs in different gamestates? As if was necessary to skip some dialogs or change the order! :-\

FIQ

  • Captain
  • *****
  • Posts: 811
  • https://github.com/FredrIQ/
    • View Profile
    • FIQ
Re: Internal commands
« Reply #67 on: August 12, 2012, 02:43:44 PM »
Quote
102 - Verdigris: "Captain! I've been so worried!"
104 - "I'm glad you're ok!"
106 - "I've been trying to find a way out, but I keep going around in circles…"
108 - "Don't worry! I have a teleporter key!"
110 - "Follow me!"

102, 104, 106, 108, 110 are dialogs, so maybe 103, 105, 107, 109 and 111 are endtexts?
Like this:

Gamestate 102:
Code: [Select]
squeak(green)
text(green,0,0,1)
Captain! I've been so worried!
position(green,above)
speak_active

Gamestate 103:
Code: [Select]
endtext
Gamestate 104:
Code: [Select]
squeak(player)
text(cyan,0,0,1)
I'm glad you're ok!
position(player,above)
speak_active

Gamestate 105:
Code: [Select]
endtext
Gamestate 106:
Quote
squeak(green)
text(green,0,0,3)
I've been trying to find a
way out, but I keep going
around in circles...
position(green,above)
speak_active

Gamestate 107:
Code: [Select]
endtext
Gamestate 108:
Code: [Select]
squeak(player)
text(cyan,0,0,2)
Don't worry! I have a
teleporter key!
position(player,above)
speak_active

Gamestate 109:
Code: [Select]
endtext
Gamestate 110:
Code: [Select]
squeak(player)
text(cyan,0,0,1)
Follow me!
position(player,above)
speak_active

Gamestate 111:
Code: [Select]
endtext
But why split all these dialogs in different gamestates? As if was necessary to skip some dialogs or change the order! :-\
In general, most gamestates <200 is very early and I guess they was created before the actual scripting language. Note that most, if not all, dialogs in the current game is created from VVVVVVscript and not with hardcoded gamestates. For example, look at gamestate 2. Familiar? ;)
http://distractionware.com/games/flash/vvvvvvproto/

And no, there's no gamestate 103 at all. (or 105, etc)
« Last Edit: August 12, 2012, 02:46:09 PM by FIQ »

Dav999

  • Global Moderator
  • Captain
  • *****
  • Posts: 2173
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #68 on: August 12, 2012, 03:21:21 PM »
That explains why a lot of gamestates are actually scripts. Actually, there are just a few scripts which aren't also accessible using gamestates! So maybe continuing using gamestates would have been a better option instead of creating a scripting language, if there was no level editor in which we can use that scripting language! :vermillion: So in this case, it would not have been a better option.

And I know that prototype already, I have played it before. (I don't know what kind of shoes :viridian: wore before version 1.0, but it made the prototype the slipperiest game I've ever seen!)

Bearboy

  • Captain
  • *****
  • Posts: 270
  • guy
    • View Profile
    • Bearboys Youtube
Re: Internal commands
« Reply #69 on: August 13, 2012, 03:10:18 AM »
I'm just gonna interrupt and say:
How do make teleporter in terminal?

Dav999

  • Global Moderator
  • Captain
  • *****
  • Posts: 2173
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #70 on: August 13, 2012, 03:33:52 AM »
I'm just gonna interrupt and say:
How do make teleporter in terminal?

Do you mean making a big round teleporter or teleport using a command?

Bearboy

  • Captain
  • *****
  • Posts: 270
  • guy
    • View Profile
    • Bearboys Youtube
Re: Internal commands
« Reply #71 on: August 13, 2012, 03:54:43 AM »
Teleporter in a terminal, internal script that executes via a terminal to teleport you to another room.
Also, the word teleport is underlined in red?  ???

Dav999

  • Global Moderator
  • Captain
  • *****
  • Posts: 2173
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #72 on: August 13, 2012, 07:13:00 AM »
Teleporter in a terminal, internal script that executes via a terminal to teleport you to another room.
Also, the word teleport is underlined in red?  ???

gotoroom(x-1,y-1), because the level editor starts with 1 but internal scripts start with 0, so if you want to teleport to room (5,13), you should use gotoroom(4,12). If you also want to go to another location in that room, which is likely, you should use gotoposition(x,y), otherwise you will change rooms while staying in the same spot on the screen. If the room you're teleporting to has a wall in that spot, you will get stuck. The coordinates are a bit trial and error, so just start somewhere like 50,50 and just decide from that whether you need to move up, down, left, right, or if it's perfect.

Bearboy

  • Captain
  • *****
  • Posts: 270
  • guy
    • View Profile
    • Bearboys Youtube
Re: Internal commands
« Reply #73 on: August 13, 2012, 07:40:04 AM »
Teleporter in a terminal, internal script that executes via a terminal to teleport you to another room.
Also, the word teleport is underlined in red?  ???

gotoroom(x-1,y-1), because the level editor starts with 1 but internal scripts start with 0, so if you want to teleport to room (5,13), you should use gotoroom(4,12). If you also want to go to another location in that room, which is likely, you should use gotoposition(x,y), otherwise you will change rooms while staying in the same spot on the screen. If the room you're teleporting to has a wall in that spot, you will get stuck. The coordinates are a bit trial and error, so just start somewhere like 50,50 and just decide from that whether you need to move up, down, left, right, or if it's perfect.
Is there a way to make that little flashy sequence before you dissappear?

Dav999

  • Global Moderator
  • Captain
  • *****
  • Posts: 2173
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #74 on: August 13, 2012, 08:01:09 AM »
Something like this:

Code: [Select]
flash(5)
playef(9)
shake(20)
delay(30)
flash(5)
playef(9)
shake(20)
delay(30)
flash(5)
playef(10)
hideplayer()
delay(30)
gotoroom(x,y)
delay(30)
flash(5)
playef(9)
shake(20)
delay(30)
flash(5)
playef(9)
shake(20)
delay(30)
flash(5)
playef(10)
showplayer()

So to get that, you will need to enter this:

Code: [Select]
say(-1)
text(1,0,0,4)
say(5)
flash(5)
playef(9)
shake(20)
delay(30)
text(1,0,0,4)
say(5)
flash(5)
playef(9)
shake(20)
delay(30)
text(1,0,0,4)
say(5)
flash(5)
playef(10)
hideplayer()
delay(30)
text(1,0,0,4)
say(5)
gotoroom(x,y)
delay(30)
flash(5)
playef(9)
text(1,0,0,4)
say(5)
shake(20)
delay(30)
flash(5)
playef(9)
text(1,0,0,4)
say(5)
shake(20)
delay(30)
flash(5)
playef(10)
text(1,0,0,4)
say(4)
showplayer()
endcutscene()
untilbars()
loadscript(stop)