Welcome, Guest. Please login or register.

Author Topic: I need help on internal scripting :(  (Read 1694 times)

Carpe DiemTopic starter

  • tOLP2 Tester
  • Crewmate
  • **
  • Posts: 31
  • Blue, Cyan, Magenta
    • View Profile
I need help on internal scripting :(
« on: 26 Jan 2014, 07:03 (7 years and 10 months ago) »
So... I'm new to VVVVVV level making.
I tried to learn to script by read Dav999's internal command list.
However, I couldn't understand most of it :victoria:
Can any of you guys show me some in-game screenshots of internal scripting?
(Especially on createentity, createcrewmate, changeplayercolour :viridian:)
Also, can you guys teach me the way to use flags?
I'm not even sure how they work :victoria:
I'd be really happy if you could do the things mentioned above :viridian:

Dav999

  • Administrator
  • Hyper Captain
  • *
  • Posts: 1604
    • View Profile
Re: I need help on internal scripting :(
« Reply #1 on: 26 Jan 2014, 08:26 (7 years and 10 months ago) »
If you're new to VVVVVV level maker it would be better to start with simplified scripting, and move to internal scripting later, because it's quite complicated.

Can any of you guys show me some in-game screenshots of internal scripting?
(Especially on createentity, createcrewmate, changeplayercolour :viridian:)
Here you go:


Also, can you guys teach me the way to use flags?
I'm not even sure how they work :victoria:
Flags are like switches- you can turn them on and off, and check if they're on or not. There are 100 flags, numbered from 0 to 99. At the start of a level, all flags are off by default.
To turn a flag on, use flag(x,on), where x is the number of the flag. To turn one off, use flag(x,off). Then to check if a flag is on, use ifflag(x,script) which means if flag x is on, leave the current script and run the specified one, otherwise continue in this script.

So you could use:

Code: (dialog_load) [Select]
ifflag(1,stop)
flag(1,on)
iftrinkets(0,dialog)

Code: (dialog) [Select]
say
Insert dialog here

This would make the dialog script run only once if you walk through a script box linked to dialog_load!

nicholashin

  • tOLP Contributor
  • Captain
  • *****
  • Posts: 248
  • (Best?) VVVVVV Player level Critic
    • View Profile
Re: I need help on internal scripting :(
« Reply #2 on: 26 Jan 2014, 15:11 (7 years and 10 months ago) »
First, a good reference:
http://vvvvvv-wiki.wikispaces.com/Level+editor+-+Script+command+reference

Also, internal scripting is difficult. Without clear concepts in simplified scripting, you may find great difficulty handling internal scripting.

iftrinkets(0,scriptname) is a line that always load the script "scriptname". This is important for switching between scripts as well as being a mean to access to internal scripting.

For instance:
Code: (script1) [Select]
iftrinkets(0,script2)
(blank line)
Code: (script2) [Select]
changeplayercolour(yellow)
(blank line)
When Viridian walks past a script box/uses a terminal with script1 (this will not work for script2), Viridian will change its colour! Note that this method is not usually used in more complex codes, like the one shown by Dav999.
« Last Edit: 27 Jan 2014, 05:35 by nicholashin »

Carpe DiemTopic starter

  • tOLP2 Tester
  • Crewmate
  • **
  • Posts: 31
  • Blue, Cyan, Magenta
    • View Profile
Re: I need help on internal scripting :(
« Reply #3 on: 26 Jan 2014, 16:23 (7 years and 10 months ago) »
Thank you guys sooo much  :viridian:
Now I'll try to make improvements on my current level (which includes no script at all for now) :shiny:

Dav999

  • Administrator
  • Hyper Captain
  • *
  • Posts: 1604
    • View Profile
Re: I need help on internal scripting :(
« Reply #4 on: 26 Jan 2014, 22:37 (7 years and 10 months ago) »
Code: (script2) [Select]
changeplayercolour(violet)
(blank line)

I just noticed: it's supposed to be purple instead of violet, internal scripting works with the colors and not the names. :)

nicholashin

  • tOLP Contributor
  • Captain
  • *****
  • Posts: 248
  • (Best?) VVVVVV Player level Critic
    • View Profile
Re: I need help on internal scripting :(
« Reply #5 on: 27 Jan 2014, 05:35 (7 years and 10 months ago) »
Code: (script2) [Select]
changeplayercolour(violet)
(blank line)

I just noticed: it's supposed to be purple instead of violet, internal scripting works with the colors and not the names. :)
fixed  :shiny: