Internal commands

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

Previous topic - Next topic

FIQ

#465
Hi.

Just wanted to say that I just realized how Dav999 got "Press ENTER to explode" with createactivityzone(). It simply has to do with createactivityzone() with anything else than crewmates give undefined behaviour, and rely on other commands fiddling around with the same points in memory.

This script:

b:
say(1)
createactivityzone(bogusdata)
text(1,0,0,4)

gives "Press ENTER to activate terminal" (which give "?SYNTAX ERROR").

This script:

b:
say(2)
face(player,red)
createactivityzone(bogusdata)
text(1,0,0,4)

gives "Press ENTER to explode" (which starts the initial cutscene).

To get full access to the activity zones, you can do something like this (activity zone ID will be N+1, where N>=1):

script:
say(-1)
text(1,0,0,4)
say(5)
do(N)
createcrewman(50,50,yellow,0,faceleft)
loop
everybodysad()
text(1,0,0,4)
say(4)
createactivityzone(a)
endcutscene()
untilbars()
loadscript(stop)

The main point of why this works is everybodysad(). everybodysad() will start a counter and increase for every crewmate on screen (including you). This same point is then used with createactivityzone() to get any ID you want besides 0 (can be gotten by face() as shown at the first example), 1 (can be gotten simply by createactivityzone(red)). 1-5 are crewmates, so these are unnecessary, you can just use the "proper" way of dealing with createactivityzone().

EDIT: I found something interesting with this -- you can actually access your own scripts' activityzone. ID 33 is ecrof evitisoP, but 34 seems to be your own script (possibly latest called script?).

Rapidgame

Quote from: FIQ on December 21, 2012, 10:15:13 PM
Quote from: Rapidgame on December 21, 2012, 08:36:11 PM
Thanks for thee entity info, now I'll wait for the effect list.  ;D
0 - Flip to ceiling
1 - Flip back to floor
2 - Cry
3 - Trinket collected
4 - Coin collected
5 - Checkpoint touched
6 - Quicker quicksand block touched
7 - Normal quicksand block touched
8 - Gravity line touched
9 - Flash
10 - Warp
11 - Viridian squeak
12 - Verdigris squeak
13 - Victoria squeak
14 - Vitellary squeak
15 - Violet squeak
16 - Vermilion squeak
17 - Terminal touched
18 - Teleporter touched
19 - Alarm
20 - Terminal squeak
21 - Time trial countdown "3", "2", "1"
22 - Time trial countdown "Go!"
23 - VVVVVV Man breaking walls
24 - Crewmates (de)combining into VVVVVV Man
25 - New record in Super Gravitron
26 - New trophy in Super Gravitron
27 - Rescued crewmate (in custom levels)

28+ segfaults


Thanks!

ToasterApocalypse

OFF TOPIC:


wtf distractionware

Rapidgame

Quote from: ToasterApocalypse on December 23, 2012, 04:02:28 PM
OFF TOPIC:


wtf distractionware

I'm on that photo! I'm there! On that... photo! Well, screenshot!

Hilbert


Rapidgame

How I can see what are the room coordinates?
I say, I want a coin over a spike/wall. Not at 0,0 (Room's left-up corner).

FIQ

Quote from: Rapidgame on December 23, 2012, 11:38:22 PM
How I can see what are the room coordinates?
I say, I want a coin over a spike/wall. Not at 0,0 (Room's left-up corner).
You'll have to test around.

Keep in mind that every 8th pixel equals to 1 tile.

blue626

Quote from: FIQ on December 23, 2012, 04:15:52 PM
Quote from: Rapidgame on December 23, 2012, 11:38:22 PM
How I can see what are the room coordinates?
I say, I want a coin over a spike/wall. Not at 0,0 (Room's left-up corner).
You'll have to test around.

Keep in mind that every 8th pixel equals to 1 tile.

Are createentity coordinates the same as gotopostion ones? If so, then 0,0 isn't exactly the top left corner.
Also note that 1 = 1 pixel and VVVVVV's resolution is 320x240.

RibShark

Am I the only one who can't get the new way of internal commands to work (the one where you can do infinite commands with no cutscenebars)? It either freezes the game or makes  :viridian: walk non-stop. If anyone could provide an example level using the new method it would be very helpful.

Dav999

Quote from: RibShark on December 28, 2012, 01:32:52 PM
It either freezes the game or makes  :viridian: walk non-stop.

That may happen with the old method too. If it happens, the only way to fix it is restarting VVVVVV. If it still doesn't work, you should redirect to the script from another script. That means: make :viridian: walk through a script box with the command iftrinkets(0,scriptname) (the script name can be anything you want, but don't use CAPITALS or $ymbols. (you can use numbers)) Then, make a script with the same name as you use in iftrinkets, containing the actual script using the new method.

RibShark

Quote from: Dav999 on December 28, 2012, 01:51:15 PM
Quote from: RibShark on December 28, 2012, 01:32:52 PM
It either freezes the game or makes  :viridian: walk non-stop.
That means: make :viridian: walk through a script box with the command iftrinkets(0,scriptname) (the script name can be anything you want, but don't use CAPITALS or $ymbols. (you can use numbers)) Then, make a script with the same name as you use in iftrinkets, containing the actual script using the new method.

That's what I'm doing...

FIQ

I don't know why that happens but I believe it happens when you make VVVVVV try unknown commands (which can only happen when playing with internal scripts, as they are simply removed otherwise).

After you've restarted. make sure the script format is like this:


script1:
iftrinkets(0,script2)

script2:
say(5)
internal
internal
internal
internal
text(1,0,0,4)
say(3)
internal
internal
etc...
text(1,0,0,4)

Do NOT have anything below the last text(1,0,0,4) except for exactly ONE blank row (if you don't, the last line gets removed).

If you still can't get it to work, upload the level so I/anyone else can tell you what you're doing wrong.

RibShark

Strange, it's working now... thanks anyway.

Dav999

Quote from: FIQ on December 28, 2012, 02:24:09 PM
I don't know why that happens but I believe it happens when you make VVVVVV try unknown commands (which can only happen when playing with internal scripts, as they are simply removed otherwise).

I think it happens if you press esc while executing the script. Sometimes it happens to me, then I save and restart, and when I load and test the level it doesn't happen, without changing the script.

sv6z2

How do you activate internals on there own without cutscene bars?
Plz help!  :victoria: