Internal Script Help

Started by moth 🦋, July 13, 2014, 08:08:08 PM

Previous topic - Next topic

moth 🦋

Help...?
I made an internal script using the say(-1) method, but all the commands after this:

say(5)
squeak(player)
text(cyan,100,100,1)
Something's wrong!
position(player,above)
speak_active
text(1,0,0,4)


show up in gray text boxes instead of actually being executed. :victoria:
here is the script:

say(-1)
text(1,0,0,4)
say(5)
shake(60)
delay(60)
flash(5)
playef(9)
text(1,0,0,4)
say(5)
shake(50)
delay(50)
flash(5)
everybodysad()
text(1,0,0,4)
say(5)
squeak(player)
text(cyan,100,100,1)
Something's wrong!
position(player,above)
speak_active
text(1,0,0,4)
say(2)
shake(80)
text(1,0,0,4)
say(5)
squeak(gray)
text(gray,100,100,1)
POWER_OVERLOAD
position(center)
speak_active
text(1,0,0,4)
say(4)
createcrewman(50,190,red,0,3)
everybodysad()
changedir(right)
text(1,0,0,4)
say(5)
squeak(red)
text(red,100,100,1)
Nooo!!! Stop it!
position(red,above)
speak_active
text(1,0,0,4)
say(5)
flash(5)
playef(9)
shake(20)
gotoroom(4,19)
text(1,0,0,4)
say(4)
endtext
endcutscene()
loadscript(stop)
text(1,0,0,4)



also "Something's wrong!" is repeated twice.  :victoria:
How does this happen? Please Help.

This is my Banner!
  Trinket! I want it!

Dav999

The blocks which start with squeak have a line too many. This is a fixed script:

say(-1)
text(1,0,0,4)
say(5)
shake(60)
delay(60)
flash(5)
playef(9)
text(1,0,0,4)
say(5)
shake(50)
delay(50)
flash(5)
everybodysad()
text(1,0,0,4)
say(2)
squeak(player)
text(1,0,0,4)

say(5)
squeak(player)
text(cyan,100,100,1)
Something's wrong!
position(player,above)
speak_active
text(1,0,0,4)
say(2)
shake(80)
text(1,0,0,4)
say(2)
squeak(gray)
text(1,0,0,4)

say(5)
squeak(gray)
text(gray,100,100,1)
POWER_OVERLOAD
position(center)
speak_active
text(1,0,0,4)
say(4)
createcrewman(50,190,red,0,3)
everybodysad()
changedir(right)
text(1,0,0,4)
say(2)
squeak(red)
text(1,0,0,4)

say(5)
squeak(red)
text(red,100,100,1)
Nooo!!! Stop it!
position(red,above)
speak_active
text(1,0,0,4)
say(5)
flash(5)
playef(9)
shake(20)
gotoroom(4,19)
text(1,0,0,4)
say(4)
endtext
endcutscene()
untilbars()
loadscript(stop)
text(1,0,0,4)

moth 🦋

#2
Thank You! 

Works like a charm! 

This is my Banner!
  Trinket! I want it!

FIQ

Remember, say(N) (N is between 1 and 5) lets you have that many lines at once, and the last one must be text(1,0,0,4) (except when ending the script with loadscript(stop) or similar), and as Dav said, you had too many (you had 6 instead of 5).

moth 🦋

Quote from: FIQ on July 15, 2014, 03:48:03 PM
Remember, say(N) (N is between 1 and 5) lets you have that many lines at once, and the last one must be text(1,0,0,4) (except when ending the script with loadscript(stop) or similar), and as Dav said, you had too many (you had 6 instead of 5).

Aahh. Did not know that.    I've been using Internal Commands for a very long time, but I haven't used textboxes yet. 

This is my Banner!
  Trinket! I want it!

moth 🦋

#5
in gotoposition(x,y,z),
there are coordinates. how do you know EXACTLY Where they are?? ??? :o
HOW??

Sorry for Caps in  EXACTLY & HOW??...


This is my Banner!
  Trinket! I want it!

allison

Quote from: ShinyWolf07 on July 18, 2014, 12:15:37 AM
in gotoposition(x,y,z),
there are coordinates. how do you know EXACTLY Where they are?? ??? :o


  • Create an alternate version of the level where the start point is where you want to teleport Viridian.
  • Load it up (via "Play a Level", not the editor)
  • Save immediately.
  • Open the [levelname].vvvvvv.vvv file in your "saves" folder with a text editor.
  • The "savex" and "savey" tags are your coordinates.

Dav999

That, or you could just try and look where Viridian ends up, then try again with an adjusted position.

moth 🦋

#8
Quote from: crazyal02 on July 18, 2014, 03:02:40 AM
Quote from: ShinyWolf07 on July 18, 2014, 12:15:37 AM
in gotoposition(x,y,z),
there are coordinates. how do you know EXACTLY Where they are?? ??? :o


  • Create an alternate version of the level where the start point is where you want to teleport Viridian.
  • Load it up (via "Play a Level", not the editor)
  • Save immediately.
  • Open the [levelname].vvvvvv.vvv file in your "saves" folder with a text editor.
  • The "savex" and "savey" tags are your coordinates.
Quote from: Dav999 on July 18, 2014, 09:54:21 AM
That, or you could just try and look where Viridian ends up, then try again with an adjusted position.

Wow. Thank you Everyone!
I think I know what to do now!
(I think you can notice that I don't like to use the forum's regular smileys · ·💧 )

This is my Banner!
  Trinket! I want it!
      Who are you?

sv6z2

Quote from: ShinyWolf07 on July 18, 2014, 12:15:37 AM
in gotoposition(x,y,z),
there are coordinates. how do you know EXACTLY Where they are?? ??? :o
HOW??

Sorry for Caps in  EXACTLY & HOW??...


This is my Banner!
  Trinket! I want it!

You can also just count the tiles (1 tile = 8 pixels) up to where you want it and then times the result by 8 and insert it into gotoposition()

moth 🦋




Why
Please help. This part of the script doesn't work at all.

shadow9997.0

2.2
#11
Hey guys, I have version 2.0 and I couldn't get 2.1 working, so I stuck with 2.0
I understand that 2.2 is released but I do not want to pay for it.
Is there an free 2.2 download anyone knows of? :(
Much appreciated.

PS: I play on Windows 8.1

Dav999

Quote from: ShinyWolf07 on August 21, 2014, 12:06:23 AM



Why
Please help. This part of the script doesn't work at all.

Unfortunately internal text boxes can't be made to work like that. You put three lines of text, then started a new block of internal commands (which overwrites your text in the process), and then you display the text box. Because of the technical restriction of 5 commands per block (including text(1,0,0,4)) that allows for 2.0 compatibility, text boxes in internal scripting can only be up to two lines high (unless you make the level 2.0 incompatible or exit internal scripting mode at that point). Also the fourth argument of the text command is the number of lines the text box has, so if you break 2.0 compatibility or exit internal scripting there, you also need to change that to 3 for your text command.

Also there's a small error in the line containing "changeai(yellow,followposition(-999)", which is not important since that should actually work (the parser appears to consider brackets and commas the same in commands).

Other than that that part of the script looks fine to me

Quote from: shadow9997.0 on August 21, 2014, 12:39:20 AM
Hey guys, I have version 2.0 and I couldn't get 2.1 working, so I stuck with 2.0
I understand that 2.2 is released but I do not want to pay for it.
Is there an free 2.2 download anyone knows of? :(
Much appreciated.

PS: I play on Windows 8.1

Where did you get v2.0 from?

moth 🦋

Quote from: Dav999 on August 21, 2014, 01:08:59 AM
unless you make the level 2.0 incompatible
Okay. I think I might do that.

allison

Quote from: shadow9997.0 on August 21, 2014, 12:39:20 AM
Hey guys, I have version 2.0 and I couldn't get 2.1 working, so I stuck with 2.0
I understand that 2.2 is released but I do not want to pay for it.
Is there an free 2.2 download anyone knows of? :(
Much appreciated.

PS: I play on Windows 8.1
There's the Make and Play version, which only supports the custom level system (i.e. you can play and create levels, but can't play the main game)