VVVVVV Level Editor Tutorial - Part 1: The basics

Started by Terry, July 26, 2011, 04:53:17 PM

Previous topic - Next topic

VVVVVVGamer03

You should make destroy(scriptbox) valid so that you don't have to waste flags if you don't want a script to repeat.

QwertymanO07

You still need a flag to keep destroyed items destroyed.

VVVVVVGamer03


Duckman50001

Quote from: VVVVVVGamer03 on September 29, 2016, 08:46:33 AM
Quote from: QwertymanO07 on September 29, 2016, 01:46:26 AM
You still need a flag to keep destroyed items destroyed.
Whoops didn't think of that  ::)

Then Terry needs to make a "foreverdestroy(gravitylines/warptokens/platforms/scriptboxes)

moth 🦋

...can't you just use flags like everyone else

actually that'd be kind of cool because literally every single level has some problem with the script limit or flag limit
I can't imagine how terry was able to make the main game with these limitations

Dav999

The main game simply doesn't have that many cutscenes.

FIQ

#81
And besides, you can easily "extend" the amount of available flags by relying on more than 1 to deactivate a script.

Let's say you've used up 90 of the flags in a level for script stuff.
If at one point you are certain that a player has to have done all these 90 things, at that point you can activate a 91th flag.
Then you can reuse the 90 other flags for more things, as long as each script also checks 91.
Simple.

And besides, what kind of level would use up all flags anyway? My own level ended up using up 16 flags for teleport history (to make cheats work), 4 flags for teleport system to work, 10 flags for various temporary purposes and to disable and/or override teleporter scripts (basically equavilent to the in-game loadteleportscript function), 16 for teleport unlockings, 8 for jukebox purposes, and 10ish (slightly less I think) for power sources and game progression in general. There's still over a third of the flags left, and I could still have optimized away quite a lot of these. Dimension Open can get away with using around 40 flags at most, it has less teleporter destinations, and while having more cutscenes, it's far more linear.

SJMistery

OOOR, you could simply make a script resetting the flags on certain points so you can re-use them... What about storing the flags 90-99 to do this:

Lets say you have many sections, we will call them A,B,C,D and E, I know, lame names, I feel lazy.

You want X events to activate on section A when you replay it, and Y events on B, etc.

Simple: after you end stage A, there is a script that enables one of the flags between 90-99 and disables every single other flag below the ones choosen as chapter resets. 95-99 will do it in our example

If you go back to A, a script activated by flag 95 will re-activate every relevant flag to the section A.
If you go to B, similarly, the flags for a replay will be set on at the start by a script related to flag 96. Again, leaving will trigger a script that will disable every flag and enable 96.

This way you can have a practically unlimited amount of flag-related scripts. And if you somehow run out of space, use a binary-like code with the flags so you have 2^N resets, N being the number of flags you save for the resetting script.

Valso22

Hey terry i have a script request, its "warp" it warps you to a room, heres an example [warp(3,5)] It places in the middle of that room an virdian (but without a little of brightness) that you can move it with the cursor

QwertymanO07

This already exists in the game as gotoroom(x,y), where it teleports the player without any effects to the room coordinates, but starting at 0.  It requires making an internal script, however, and places the player at the same place on the screen that they teleported from.

moth 🦋

Quote from: QwertymanO07 on January 15, 2017, 11:14:49 PM
This already exists in the game as gotoroom(x,y), where it teleports the player without any effects to the room coordinates, but starting at 0.  It requires making an internal script, however, and places the player at the same place on the screen that they teleported from.
if combined with gotoposition(x,y,n), you can place the player anywhere in the room.

Valso22

Quote from: Habstinat on July 29, 2011, 12:46:23 PM
Quote from: PastorOfMuppets on July 29, 2011, 07:12:13 AM
Quick question: Is there any way to make crewmate-specific lines, like there are in the actual game? For example, if I wanted Vermillion to say something like "Hey, Captain!", could I get it to show up in his color, rather than the grey that the say command gives you?
There aren't any (documented) ways to do this as of yet that I'm aware of.
Quote from: Insani on July 29, 2011, 06:42:54 AM
How do you change the level size? I want to turn my 5x5 level ~10x10ways.
Hold Shift and use the arrow keys.
Umm the first question i answer me. Ok type a command called "say(<lines>,<crewmate color>).
If you dont put the number of lines, the game would crash


Valso22

How i can make an npc move OR the player control the npc?

QwertymanO07

Quote from: Valso22 on January 16, 2017, 05:17:03 AM
Umm the first question i answer me. Ok type a command called "say(<lines>,<crewmate color>).
If you dont put the number of lines, the game would crash
This was posted long before an update added crewmate colored textboxes.  As a general rule, if someone says something in VVVVVV is impossible that clearly isn't, chances are they were using an older version, so replying to their post will not help anything.

Quote from: Valso22 on January 16, 2017, 05:30:05 AM
How i can make an npc move
First, you need to use a technique called "Internal Scripting"; you can find the details here (though note that you can make the say() blocks up to 50).  From there, you can use the createcrewmate() command to create an NPC, then use the changeai() command to set their ai to something like "followposition,12" to make them walk near position 12 (though obviously you could use any number).
Quote from: Valso22 on January 16, 2017, 05:30:05 AMOR the player control the npc?
"NPC" is short for "non-player character", so they simply wouldn't be an NPC if the player controlled them.  If you mean making the player into someone other than Viridian, you're looking for another internal command called changeplayercolour(), though that resets upon death.

Valso22



"NPC" is short for "non-player character", so they simply wouldn't be an NPC if the player controlled them.  If you mean making the player into someone other than Viridian, you're looking for another internal command called changeplayercolour(), though that resets upon death.

so like changeplayercolour(#FFAAAA)?