Suggestion for VVVVVV Editor

Started by A quite MEDICal Derpfish, January 27, 2013, 03:14:11 AM

Previous topic - Next topic

A quite MEDICal Derpfish

-Be able to change player color.

Why not? It could be useful for making story maps.

Dav999

That's already possible, try this script:

say(-1)
text(1,0,0,4)
say(4)
changeplayercolour(red/yellow/green/blue/purple/cyan)
endcutscene()
untilbars()
loadscript(stop)

It's also possible to do it without the cutscene bars and without the color reverting to cyan when you die/save, but this shows that it's possible. :viridian:

Dav999

Okay, this is a better way to do it:

The first script contains 'iftrinkets(0,[name of second script])', this script should be placed where you want :viridian:s color to change, and all checkpoints should be inside of script boxes for this script (you can make more than one script box for the same script). So if you respawn somewhere, you also respawn inside of the script box.

The second script should have a name which doesn't have capital letters or special characters, use just small letters and numbers to be safe (if you use capital letters or certain special characters, the script won't run). This name should be in the second argument of iftrinkets in the first script, so if you call the second script 'colorscript', the command in the first script should be 'iftrinkets(0,colorscript)'. This second script should also have one command: 'changeplayercolour(red)', 'changeplayercolour(yellow)', 'changeplayercolour(green)', 'changeplayercolour(blue)' or 'changeplayercolour(purple)', or even 'changeplayercolour(teleporter)' depending on the color you want to change viridian to (and colour should be spelt like colour). There should be exactly one empty line below that command.

And checkpoints should not be in the same room as spikes or enemies where you want the color to not be cyan.

Use 'changeplayercolour(cyan)' or 'restoreplayercolour' to change back to :viridian:.

A quite MEDICal Derpfish

Cool! Thanks for telling me. I could put this to use when I figure out the scripting part of the editor.

Dav999

Oh, and if you didn't know, changeplayercolour(x) is an internal command, meaning you can't just put it somewhere between the regular commands in a script, and that's why you have to load the script that contains it with iftrinkets(0,x), or use say(-1), the stuff with keeping one line empty, etc.

blue626

If you're interested in using internal commands, you can see all of them and what each command does and how to use them here: Internal commands.
Also, note that the use of internal scripting is a glitch exploit, it was not intended to use.