Internal commands

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

Previous topic - Next topic

blue626

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

ToasterApocalypse

:verdigris: REQUESTING HELP   :verdigris:
Here's a script I've got.


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

If you were flipped when the script starts, then there you go!

blue626

#363
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:

Quote from: blue626 on October 18, 2012, 04:47:51 PM
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! ???

Quote from: blue626 on October 18, 2012, 04:47:51 PM
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.

Dav999

Try gotoposition(175,100,0).

FIQ

gotoposition() occasionally doesn't work properly unless it's right after a gotoroom() command. At least that's my experience of using it.

blue626

Quote from: FIQ on November 06, 2012, 09: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.

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

Dav999

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


FIQ

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

#370
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)

Dav999

Quote from: FIQ on November 10, 2012, 12:56:53 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

Quote from: Dav999 on November 10, 2012, 08:08:57 AM
Quote from: FIQ on November 10, 2012, 12:56:53 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:

vvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvv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vvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvVvv


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

ToasterApocalypse

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

Quote from: ToasterApocalypse on November 13, 2012, 07:06:20 PM
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.