Author Topic: Internal commands  (Read 261142 times)

blue626

  • Captain
  • *****
  • Posts: 672
  • I changed my avatar!
    • View Profile
Re: Internal commands
« Reply #360 on: November 02, 2012, 11:00:32 AM »
There's no reason to discuss the same thing twice... unless you give more info. Let's discuss gotoposition, as I've been testing that.

VVVVVV's "screen" is 320x240, counting the amplified pixels (because the default is running with 2x resolution). With what I described before andn the fact that :viridian: is 10 pixels wide, you can calculate the values for x for teleeporting :viridian: to the right or left edge of the screen (both showing all of :viridian:). x=-7 for left edge and x=303 for right edge. Higher/lower values either show part of  :viridian: on the edge of the screen, or teleport :viridian: to the screen to the right/left. That's right. ;) However, if the screen has horizontal warping or the level has only 1 column, then :viridian: will always be teleported to the same screen. Example: gotoposition(320,y) will teleport :viridian: to the left edge of the screen while gotoposition(-20,y) will teleport :viridian: to the right edge of the screen.
This doesn't work with warp lines. In fact, there's a glitch related to it and the warp line glitch (if don't want to read about it, skip to the bold text below). Create a level with 1 line of rooms and more than 1 room. Put warp lines on the right side of the room in which the command is triggered. Do not put warp line on the room to the left. Create a script with the necessary commands and the main command, which is gotoposition(-10,0). :viridian: Will stay in the same room, appearing on the left only showing part of his body. When he touches the lower edge of the screen, he will appear (on the top) on the right edge of the room to the left, showing only part of his body.
This means you don't need the gotoroom command, unless you think that counting the distance in rooms b between the 2 rooms, multiplying it by 320 and add or subtract something to set :viridian:'s position in the room is too hard.

I still haven't tested y and z (don't forget about z, which makes :viridian: flipped or not, according to Toaster).

EDIT: Oh, and is it a good idea to talk about int. scr. in the wiki? Of course I'll mention that it's a glitch and it's use wasn't intended.
« Last Edit: November 02, 2012, 03:10:08 PM by blue626 »

ToasterApocalypse

  • Captain
  • *****
  • Posts: 1010
  • le lenny face
    • View Profile
Re: Internal commands
« Reply #361 on: November 06, 2012, 11:12:22 AM »
:verdigris: REQUESTING HELP   :verdigris:
Here's a script I've got.

Code: [Select]
say(4)
fadeout
delay(30)
gotoroom(3,0)
text(1,0,0,4)
say(2)
delay(10)
text(1,0,0,4)
say(5)
createcrewman(250,100,yellow,0,faceleft)
gotoposition(175,100)
delay(10)
walk(right,1)
text(1,0,0,4)
say(3)
delay(20)
fadein
text(1,0,0,4)

INTENDED:
Screen fades out
Go to room 4,1 (Looks like Violet's room)
Vitellary created where Viridian stands at the start
Viridian on the floor at 175,100
Viridian faces vitellary
Screen fades in

WHAT HAPPENS:
Screen fades out
Go to room 4,1 (Looks like Violet's room)
Vitellary created where Viridian stands at the start
Viridian on the CEILING at 175,100, cannot flip.
Viridian faces vitellary
Screen fades in



What's happening?

Hilbert

  • Captain
  • *****
  • Posts: 574
  • Yup. This is my name. Not Black, Hilbert.
    • View Profile
Re: Internal commands
« Reply #362 on: November 06, 2012, 12:41:02 PM »
If you were flipped when the script starts, then there you go!

blue626

  • Captain
  • *****
  • Posts: 672
  • I changed my avatar!
    • View Profile
Re: Internal commands
« Reply #363 on: November 06, 2012, 12:43:52 PM »
Try to rise the ceiling to see if :viridian: looks like he/she's falling down instead of up when he/she's falling up. If it really does do that. Then it's the same glitch as this:

I found a weird glitch:
gotoroom(x,y) acts differently in different ways of executing internal scripting! :o Consider methods A, B, and C.
Method A is this:

say(-1)
gotoroom(x,y)

(other text)

Here's what happens when triggering the script with method A:

 :viridian: goes to position x,y and falls upwards... but his/her feet are pointing down! Before you can move a centered grey text box with either the last script triggered in a level outside the editor or a line with costumposition(center) (the last only happens and always happens if you trigger the script with method B first) appears. When he/she touches a ceiling his/her feet suddenly point upwards... and he/she can't flip! I'm sure this is a glitch!

When I tested with the right method it worked fine! ???

I found a weird glitch:
gotoroom(x,y) acts differently in different ways of executing internal scripting! :o Consider methods A, B, and C.

(other text)

Method C is the one mentioned in the 2nd post (or something similar...):

say(-1)
text(1,0,0,4)
say(5)
gotoroom(x,y)
endtext
endcutscene
untilbars
loadscript(stop)

(other text)

When triggering the script with method C:

 :viridian: goes to position x,y, falls downwards and his/her feet are pointing down. No text box appears, you can flip. In other words, it works well.

Maybe it's related to the fact that it isn't the 1st command in your script? I don't know.

New reply?!
Maybe Roskilla is right, but try to do what I said. If the glitch doesn't happen and you trigger the script while you're flipped, then Roskilla is right. Use the z value to put :viridian: on the ground.
« Last Edit: November 06, 2012, 12:55:01 PM by blue626 »

Dav999

  • Global Moderator
  • Captain
  • *****
  • Posts: 2173
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #364 on: November 06, 2012, 01:04:17 PM »
Try gotoposition(175,100,0).

FIQ

  • Captain
  • *****
  • Posts: 811
  • https://github.com/FredrIQ/
    • View Profile
    • FIQ
Re: Internal commands
« Reply #365 on: November 06, 2012, 01:09:15 PM »
gotoposition() occasionally doesn't work properly unless it's right after a gotoroom() command. At least that's my experience of using it.

blue626

  • Captain
  • *****
  • Posts: 672
  • I changed my avatar!
    • View Profile
Re: Internal commands
« Reply #366 on: November 09, 2012, 10:59:04 AM »
gotoposition() occasionally doesn't work properly unless it's right after a gotoroom() command. At least that's my experience of using it.

At my experience it does work. That's how I've been testing it! Look at my last posts here.

Dav999

  • Global Moderator
  • Captain
  • *****
  • Posts: 2173
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #367 on: November 09, 2012, 12:30:17 PM »
I finally wanted to check what the second argument in playef(x,x) does. Apparently it doesn't do anything. If it doesn't do anything, then why is it used everywhere in the main game (it's 10 everywhere)? ???

ToasterApocalypse

  • Captain
  • *****
  • Posts: 1010
  • le lenny face
    • View Profile
Re: Internal commands
« Reply #368 on: November 09, 2012, 02:44:53 PM »
Try gotoposition(175,100,0).

That fixed it. Thanks!  :viridian:

FIQ

  • Captain
  • *****
  • Posts: 811
  • https://github.com/FredrIQ/
    • View Profile
    • FIQ
Re: Internal commands
« Reply #369 on: November 09, 2012, 04:45:52 PM »
Just a FYI -- if you ever need to emulate untilbars() in simplified commands, the delay from full cutscenebars to empty (or vice versa) is ~13 ticks. So delay(13) does the trick.

FIQ

  • Captain
  • *****
  • Posts: 811
  • https://github.com/FredrIQ/
    • View Profile
    • FIQ
Re: Internal commands
« Reply #370 on: November 09, 2012, 04:56:53 PM »
Dav999, can you please edit this list into the first post (and fix any mistakes in case I did some. Probably remove 15 from the list too, as 2.1 final seems to not get released at all)

Internal playlist
0 - Path Complete
1 - Pushing Onwards
2 - Positive Force
3 - Potential For Anything
4 - Passion For Exploring
5 - Pause
6 - Presenting VVVVVV
7 - Plenary
8 - Predestined Fate
9 - ecroF evitisoP
10 - Popular Potpurri
11 - Pipe Dream
12 - Pressure Cooker
13 - Paced Energy
14 - Piercing The Sky
(15 - Predestined Fate Remixed)
« Last Edit: November 09, 2012, 04:59:07 PM by FIQ »

Dav999

  • Global Moderator
  • Captain
  • *****
  • Posts: 2173
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #371 on: November 10, 2012, 12:08:57 AM »
Dav999, can you please edit this list into the first post (and fix any mistakes in case I did some. Probably remove 15 from the list too, as 2.1 final seems to not get released at all)

Done. :) There are a few more lists, I think, but some of them are too long. Why doesn't the forum have spoiler tags which you can expand and shrink?

allison

  • Captain
  • *****
  • Posts: 924
  • monolithic since 2012??
    • View Profile
    • Allison Fleischer
Re: Internal commands
« Reply #372 on: November 10, 2012, 06:41:30 AM »
Dav999, can you please edit this list into the first post (and fix any mistakes in case I did some. Probably remove 15 from the list too, as 2.1 final seems to not get released at all)

Done. :) There are a few more lists, I think, but some of them are too long. Why doesn't the forum have spoiler tags which you can expand and shrink?

Code blocks never go above a certain length; if they go beyond the length, this happens:

Code: [Select]
vvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvv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vvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvVvv

If it gets to long, there's a mini scroll bar.

ToasterApocalypse

  • Captain
  • *****
  • Posts: 1010
  • le lenny face
    • View Profile
Re: Internal commands
« Reply #373 on: November 13, 2012, 11:06:20 AM »
Lets talk about tilecol, platv and everything else found in the level file that you can't edit in VVVVVV.

Ok guys?

I'll start: List all the tilesets you can't get without Direct Mode, like tilecol=6 with warpzone tileset.

blue626

  • Captain
  • *****
  • Posts: 672
  • I changed my avatar!
    • View Profile
Re: Internal commands
« Reply #374 on: November 13, 2012, 11:31:59 AM »
Lets talk about tilecol, platv and everything else found in the level file that you can't edit in VVVVVV.

Ok guys?

I'll start: List all the tilesets you can't get without Direct Mode, like tilecol=6 with warpzone tileset.

That isn't internal scripting, is it? Create a new thread for it... or use this thread.

I don't know if this is the right place for this or not, but FIQ discovered that the number of trinkets collected is a 32-bit number and it wraps around back to 0 after giving a trinket while having 232-1=1111...1111 (32 1's) in binary. This means that having -1 trinkets (you can set that by editing the .vvvvvv file) is the same as having 232-1 trinkets! That makes the word "lots" make more sense, but the wrapping is weird.