Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

Will my script run?

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
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)

PostPosted: Wed Oct 20, 2010 6:35 pm    Post subject: Will my script run? Reply with quote

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
View user's profile Send private message
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Wed Oct 20, 2010 7:24 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Thu Oct 21, 2010 2:39 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
JSH357




Joined: 02 Feb 2003
Posts: 1705

PostPosted: Thu Oct 21, 2010 5:37 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Greenwado
Well, it's just me, what did you expect?




Joined: 09 Aug 2010
Posts: 70
Location: Okacha (OK-A-CHA)

PostPosted: Thu Oct 21, 2010 2:41 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group