View previous topic :: View next topic |
Author |
Message |
Greenwado Well, it's just me, what did you expect?

Joined: 09 Aug 2010 Posts: 70 Location: Okacha (OK-A-CHA)
|
Posted: Wed Oct 20, 2010 6:35 pm Post subject: Will my script run? |
|
|
Ok this is my first programing script ever so don't yell.
Code: |
script,run,begin
if,begin
suspend player
show textbox 1
wait (ticks 6)
show textbox 2
wait (ticks 6)
show textbox 3
resume player
)
)
end
|
Will this work?
If not can someone rewrite this?
It's for a school project so the sooner the better!
Thanks for the help! _________________ Happy RPG Makin |
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Wed Oct 20, 2010 7:24 pm Post subject: |
|
|
The "if, begin" is wrong and won't compile. I don't think you want an if at all.
The rest looks okay to me, assuming I correctly understand what the script is supposed to do. |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Thu Oct 21, 2010 2:39 am Post subject: |
|
|
Actually, the rest is wrong too ;)
Use if only when you want some code to only run sometimes.
I assume you want to attach this script to something in Custom. To do that you need to use 'plot:plotscript' instead of script. script is only for internal scripts that you don't want to show up in the script browser Custom.
You need to make sure that your brackets match up, or Hspeak will give you a confusing error message. ( is the same as begin. Notice that you have two begin/('s at the beginning of your script (including after the if), and 3 end/)'s at the end.
"show textbox 1" should be "show textbox (1)"
"wait (ticks 6)" should be "wait (6)".
Also, it's worth mentioning that suspending the player while a textbox is shown does nothing. While a textbox is being displayed, the player can't do anything other than press enter to advance the textbox anyway. Maybe you meant 'plot:suspend box advance' instead?
So the fixed script is
Code: | plotscript, run, begin
suspend box advance
show textbox (1)
wait (6)
show textbox (2)
wait (6)
show textbox (3)
resume box advance
end |
_________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
JSH357

Joined: 02 Feb 2003 Posts: 1705
|
Posted: Thu Oct 21, 2010 5:37 am Post subject: |
|
|
On that note, 6 ticks is a really short amount of time. I would recommend using a much higher number, in the 20-40 range probably, between boxes. |
|
Back to top |
|
 |
Greenwado Well, it's just me, what did you expect?

Joined: 09 Aug 2010 Posts: 70 Location: Okacha (OK-A-CHA)
|
Posted: Thu Oct 21, 2010 2:41 pm Post subject: |
|
|
Well this is mmy opening cutscene with the "Greenwado presents" ETC. But this is my first script ever on any language and it looked nice at first... _________________ Happy RPG Makin |
|
Back to top |
|
 |
|