VVVVVV Level Editor Tutorial - Part 1: The basics

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

Previous topic - Next topic

Blublu

Yeah, that's what I figured. I'll have to design around that. :P

Insani

HEY! I need help.

I'm working on a level where the difficulty is decided by a trinket... The enchanced testing program.

Anyway, here's the script.

iftrinketsless(1,destroywarp)
end

------

So if you have less than 1 trinket, the warp is destroyed and you get an easy way...

now, destroywarp script is this:

destroy(warptokens)
flash

... what am i doing wrong?

PJBottomz

You put "iftrinketsless" - if you want it to activate when you have 1 trinket, put:

iftrinkets(1,destroywarp)
end


Also, "destroywarp" should look like this:

flash
destroy(warptokens)
end

Insani

Quote from: PJBottomz on September 14, 2011, 08:03:50 PM
You put "iftrinketsless" - if you want it to activate when you have 1 trinket, put:

iftrinkets(1,destroywarp)
end


Also, "destroywarp" should look like this:

flash
destroy(warptokens)
end


Exactly, I want the warp to be destroyed if you have no trinkets at all - the trinket triggers a difficulty mode.

I'll try rearranging flash and destroy though...

PJBottomz

#49
Hmm, that's peculiar...

I'll run my own test of it, and post the results.

EDIT: Okay, I ran my own test of it, and it had the same results: nothing. I guess iftrinketsless is broken or something. :-/ The only option seems to be to use the basic route - use iftrinkets.

Insani

#50
Quote from: PJBottomz on September 15, 2011, 01:25:20 AM
Hmm, that's peculiar...

I'll run my own test of it, and post the results.

EDIT: Okay, I ran my own test of it, and it had the same results: nothing. I guess iftrinketsless is broken or something. :-/ The only option seems to be to use the basic route - use iftrinkets.

Damn... I suppose I could change the trinket to an 'easy mode' option.

EDIT:

http://filesmelt.com/dl/SOOPAVV.vvvvvv

VVVVVVMAN is the best command in the game.

darkhog

Quote from: randomnine on July 28, 2011, 08:10:09 PM
Quote from: Ice on July 28, 2011, 01:29:54 AM
Is there a way to check if a flag is off? It would help me make a script only activate once.

Here's how I'm doing scripts that only activate once.

At the start of the game, trigger a script which sets flag x to "on"

Put a trigger zone for the once-only script, hitting a very simple script called scriptconditional.

scriptconditional:
ifflag(x,script)

Set up the script itself separately.

script:
flag(x,off)
... (all the other script stuff)

The name of "script" has to be lowercase or the jump from ifflag() won't hit it. You also have to do it this way round, as when ifflag() triggers, it puts black borders around the screen which don't disappear until a say() or a reply() - so your script needs at least one of those in, too!

I've actually came upon even simpler solution for playing scripts one time than this:
ifflag(x,stop)
(proper script)
flag(x,on)


"stop" is dummy, empty script (you can name it as you like, but it's most intuitive) and x must be same in first and last flag command for obvious reasons.

spadler097

Hi, I am a beginner of scripting. And I currently encounter some scripting problems: :victoria:

1. I don't understand the term "flag" in the tutorials. I mean, what will it do?
2. What does the "x" means in the command flag(x,on)?
3. Can I "see" a flag?
4. Can I make a specific crew member to talk if there is more than one crew member in a room?

I hope my questions will not be too difficult to answer. :verdigris:

(Sorry for the bad English, if there is any) :viridian:

FIQ

Quote from: spadler097 on March 18, 2012, 09:43:29 AM
Hi, I am a beginner of scripting. And I currently encounter some scripting problems: :victoria:

1. I don't understand the term "flag" in the tutorials. I mean, what will it do?
2. What does the "x" means in the command flag(x,on)?
3. Can I "see" a flag?
4. Can I make a specific crew member to talk if there is more than one crew member in a room?

I hope my questions will not be too difficult to answer. :verdigris:

(Sorry for the bad English, if there is any) :viridian:

1: Flags is essential to any game/level with some kind of progressing in terms of script - you can use them to make a script only run once, make so a certain flag must be on to do something, and so on.
For example, you can make 2 (or rather 3) scripts like this:

script1
flag(1,on)
say(1)
You've executed this script! Now, you'll have access to script 2 properly!

script2
ifflag(1,script3)
say(2)
Access denied.
You have to execute script1 for this to work!

script3
say(1)
Access granted!


I'm bad at describing things, tell me if you didn't understand!

-----

2: x means anything. In this case, a number. x is to mark that you can type whatever you want in here.
For example: "say(x)" - you type in whatever you want instead of x (in this case a number between 1 and 5, (and in the 2.1 beta, 1 and 11).


3: You can check if a flag is on by ifflag(x,runscript) (runscript is another script, x is the flag number), if this was what you meant?

4: In the 2.1 beta (you can find this in the VVVVVV Technical Discussion forum), you can use say(x,crewmate name). This will make the text appear in the color equal to crewmate name. For example:

say(1,vitellary)
Hi, Vitellary here.

Hilbert

Terry
When I opened the editor after editing and closing a Level, the passion for exploring music played.
It only stopped after I closed the game. Help...?

blue626


TheJonyMyster

Sorry for... "bumping" but on Mac you don't need to ctrl click for right click. It has nothing to do with the OS, just the mouse you're using.

Dav999

Quote from: TheJonyMyster on June 24, 2013, 02:11:06 AM
Sorry for... "bumping" but on Mac you don't need to ctrl click for right click. It has nothing to do with the OS, just the mouse you're using.

On trackpads, you can also click with two fingers; that's how I right click every time.

TheJonyMyster

I have a trackpad, and I can right click normally.

weee50

Quote from: increpare on July 28, 2011, 10:12:08 AM
pressing m *anywhere* right now mutes the game.  try pressing m again.
Maybe 2.2 should fix that.