Author Topic: Internal commands  (Read 258365 times)

FIQ

  • Captain
  • *****
  • Posts: 811
  • https://github.com/FredrIQ/
    • View Profile
    • FIQ
Re: Internal commands
« Reply #465 on: December 23, 2012, 01:49:00 PM »
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?).
« Last Edit: December 23, 2012, 02:12:29 PM by FIQ »

Rapidgame

  • Crewmate
  • **
  • Posts: 20
  • I'm making a fan-made "The Tower". Scroll madness!
    • View Profile
Re: Internal commands
« Reply #466 on: December 23, 2012, 02:15:47 PM »
Thanks for thee entity info, now I'll wait for the effect list.  ;D
Code: [Select]
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

  • Captain
  • *****
  • Posts: 1010
  • le lenny face
    • View Profile
Re: Internal commands
« Reply #467 on: December 23, 2012, 08:02:28 AM »
OFF TOPIC:


wtf distractionware

Rapidgame

  • Crewmate
  • **
  • Posts: 20
  • I'm making a fan-made "The Tower". Scroll madness!
    • View Profile
Re: Internal commands
« Reply #468 on: December 23, 2012, 03:19:36 PM »
OFF TOPIC:


wtf distractionware

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

Hilbert

  • Captain
  • *****
  • Posts: 574
  • Yup. This is my name. Not Black, Hilbert.
    • View Profile
Re: Internal commands
« Reply #469 on: December 23, 2012, 03:36:28 PM »
OFF TOPIC:


wtf distractionware
TIME ZONES



i think

Rapidgame

  • Crewmate
  • **
  • Posts: 20
  • I'm making a fan-made "The Tower". Scroll madness!
    • View Profile
Re: Internal commands
« Reply #470 on: December 23, 2012, 03: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).

FIQ

  • Captain
  • *****
  • Posts: 811
  • https://github.com/FredrIQ/
    • View Profile
    • FIQ
Re: Internal commands
« Reply #471 on: December 23, 2012, 08:15:52 AM »
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

  • Captain
  • *****
  • Posts: 672
  • I changed my avatar!
    • View Profile
Re: Internal commands
« Reply #472 on: December 25, 2012, 12:52:24 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

  • Crewmate
  • **
  • Posts: 23
    • View Profile
Re: Internal commands
« Reply #473 on: December 28, 2012, 05:32:52 AM »
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

  • Global Moderator
  • Captain
  • *****
  • Posts: 2173
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #474 on: December 28, 2012, 05:51:15 AM »
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

  • Crewmate
  • **
  • Posts: 23
    • View Profile
Re: Internal commands
« Reply #475 on: December 28, 2012, 06:18:50 AM »
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

  • Captain
  • *****
  • Posts: 811
  • https://github.com/FredrIQ/
    • View Profile
    • FIQ
Re: Internal commands
« Reply #476 on: December 28, 2012, 06:24:09 AM »
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

  • Crewmate
  • **
  • Posts: 23
    • View Profile
Re: Internal commands
« Reply #477 on: December 28, 2012, 06:30:11 AM »
Strange, it's working now... thanks anyway.

Dav999

  • Global Moderator
  • Captain
  • *****
  • Posts: 2173
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #478 on: December 28, 2012, 08:27:35 AM »
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.

Hennal

  • Doctor
  • ***
  • Posts: 93
    • View Profile
Re: Internal commands
« Reply #479 on: January 03, 2013, 12:20:03 PM »
How do you activate internals on there own without cutscene bars?
Plz help!  :victoria: