Problem with iftrinkets and cutscene bars, implement music

Started by Don, July 30, 2012, 12:56:18 PM

Previous topic - Next topic

Don

Hello, I hope this is the right section to post this.
I've been trying to master the iftrinkets command in my test level, although I just get some empty cutscene bars instead of activating my desired script. Can anyone tell me what I'm doing wrong? Or is this just a bug?
The scripts look like this:

Name: destroy blocks with trinkets
iftrinkets(2,destroy warps)
say(2)
You must obtain 2 trinkets in order
to get past this obstacle.

Name: destroy warps
destroy(warptokens)

Also, how do I do when I want to create scripts that aren't bound to any item? So far I've been placing script boxes and then deleted them right away just to get a new script in my script editor, although I get the feeling that I'm not doing it the right way.
I'll upload my level just in case anyone wants to see the real thing. PS. Please don't mind the terminal to the right in the first room. Also, beware of a random flash in the second room.

Another question that I'd like to ask is whether there are any method to implement music into VVVVVV? I've found some persons have made tools to extract vvvvvvmusic.vvv but no tools that do the reverse.

Cheers,
Don

Dav999

If I change iftrinkets(2,destroy warps) into iftrinkets(2,destroywarps), and change the name of the script to destroywarps, it works. Try to avoid spaces/capital letters/special characters in script names. There is a chance it doesn't work. Only use small letters and numbers.

The cutscene bars appear because the script is first scanned for say and reply commands, and if it finds any, it will turn on the cutscene bars. The script could be changed to this:

destroyblockswithtrinkets:
iftrinkets(2,destroywarps)
iftrinkets(0,dontdestroy)


destroywarps:
destroy(warptokens)

dontdestroy:
say(2)
You must obtain 2 trinkets in order
to get past this obstacle.


There is also a command, iftrinketsless(x,x), but I just can't get it to work at all... Anyway, these three scripts work and will not turn on cutscene bars if you get two trinkets.

Also, there is no way to create a script other than with a script box or a terminal, so you're doing it the right way.

Don

Sorry for the late reply. Thanks for the quick answer (no joke intended). It works now.

Dav999


Hilbert

#4
Quote from: Dav999 on July 30, 2012, 01:46:25 PM
If I change iftrinkets(2,destroy warps) into iftrinkets(2,destroywarps), and change the name of the script to destroywarps, it works. Try to avoid spaces/capital letters/special characters in script names. There is a chance it doesn't work. Only use small letters and numbers.

The cutscene bars appear because the script is first scanned for say and reply commands, and if it finds any, it will turn on the cutscene bars. The script could be changed to this:

destroyblockswithtrinkets:
iftrinkets(2,destroywarps)
iftrinkets(0,dontdestroy)


destroywarps:
destroy(warptokens)

dontdestroy:
say(2)
You must obtain 2 trinkets in order
to get past this obstacle.

Or you could just have two scripts containing

destroyblockswithtrinkets:
iftrinkets(2,destroywarps)
say(2)You don't have enough trinkets.
You need two to get past.


destroywarps:
destroy(warptokens)
say(1)
Destroyed.
reply(1)
Now I can save Vitellary!


Also, you can implement music in the options menu, or in scripts with music(x)* but no custom music. Only tracks from the main game.

*note that the M key mutes the game, so if sound turns off you know why.