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

Problem With Textboxes

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
Mr B




Joined: 20 Mar 2003
Posts: 382

PostPosted: Tue Feb 24, 2004 10:43 am    Post subject: Problem With Textboxes Reply with quote

Hey folks,

Okay, here's the deal. I have a script that plays some music. At the end of the script, I want the main map music to play again. I made an empty (no text) textbox that has the "Restore Map Music" bitset (or whatever it's called) on, and put it in the script, like so:
Code:
show text box (tb#)
advance text box

Unfortunately, the "advance text box" command doesn't seem to be working. From my understanding of plotscripting, these two commands should show the textbox, then immediately advance it without the player pressing "enter." However that doesn't work.

So I tried this:
Code:
suspend text box advance
show text box (tb#)
advance text box
resume text box advance

But that still didn't work -- the player still has to press "enter."

(I don't have the code in front of me, so I'm probably not using the exactly syntactically-correct plotscript commands...but you know which ones I am refering to)

Does anyone have any suggestions as to what I'm doing wrong?

Thanks!
-B
Back to top
View user's profile Send private message
Uncommon
His legend will never die




Joined: 10 Mar 2003
Posts: 2503

PostPosted: Tue Feb 24, 2004 12:53 pm    Post subject: Reply with quote

Try this...

Code:
show textbox (#)
wait (1)
advance textbox


My theory is that the script isn't getting enough time to know about the textbox before it disappears, so a "wait (1)" would give it the time it needs.

Let me know if this helps.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Setu_Firestorm
Music Composer




Joined: 26 Mar 2003
Posts: 2566
Location: Holiday. FL

PostPosted: Tue Feb 24, 2004 2:46 pm    Post subject: Reply with quote

Uncy's right. You have to give the text box time to stay on the screen before it can be advanced.
_________________


Facebook: http://www.facebook.com/georgerpowell
Newgrounds: http://setu-firestorm.newgrounds.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address MSN Messenger
Flamer
The last guy on earth...




Joined: 04 Feb 2003
Posts: 725
Location: New Zealand (newly discovered)

PostPosted: Wed Feb 25, 2004 2:08 am    Post subject: Reply with quote

don't you want to use "wait for textbox" instead...
i mean you don't want the player having 1 tick to read what's on the textbox.
_________________
If we were a pack of dogs, IM would be a grand Hound, CN would be a very ficious little pitball, and Giz...well, it doesn't matter breed he is, he'd still be a bitch Raspberry!
(no offense to anyone that was mentioned)
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address MSN Messenger
*Worthy*
Critical Thinker




Joined: 11 Aug 2003
Posts: 186

PostPosted: Wed Feb 25, 2004 3:29 am    Post subject: Reply with quote

Flamer, there will not be anything on the text box. He is simply trying to restore the map's music. Personally, I don't know why he doesn't use "stop song" and "play song", but I suppose that's beside the point. The only purpose of the text box is to change the music, not to allow the player to actually read anything; that's why he is only waiting one tick and not "wait for text box".

~Worthy
_________________
You can do whatever you want...but prison is full of people who make bad decisions.
Back to top
View user's profile Send private message Send e-mail AIM Address
Mr B




Joined: 20 Mar 2003
Posts: 382

PostPosted: Wed Feb 25, 2004 10:48 am    Post subject: Reply with quote

Hmm... Okay. I shall have to try the "wait(1)" idea. Perhaps it will work.

However, won't that introduce a bit of a 'catch' in the game (say, if the hero is walking)? Though that short of a wait is pretty negligable...

The reason that I am not using "stop/play song" is because this script can be triggered on multiple maps, each playing a different map song. There simply is no plotscripting command that restores the default map song, so I'm trying to use the textbox method.

Thank you for your ideas, folks. This may solve the problem.
Back to top
View user's profile Send private message
*Worthy*
Critical Thinker




Joined: 11 Aug 2003
Posts: 186

PostPosted: Wed Feb 25, 2004 12:16 pm    Post subject: Reply with quote

I highly doubt the "wait" command will cause the game to slow down at all. I mean, it only waits around 1/15th of a second, so it shouldn't be a big deal. If it is, however, you could through in some if statements to check what map the hero is on. If you have a lot of mapts, that would not be the best way, but if you are only dealing with 2-3 maps, you could do that.

~Worthy
_________________
You can do whatever you want...but prison is full of people who make bad decisions.
Back to top
View user's profile Send private message Send e-mail AIM Address
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Wed Feb 25, 2004 11:44 pm    Post subject: Reply with quote

A player would notice a one cycle pause in the game. However, they would probably ignore it. It is noticable.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
Mr B




Joined: 20 Mar 2003
Posts: 382

PostPosted: Fri Feb 27, 2004 1:38 pm    Post subject: Reply with quote

Well, thanks for the help, guys.

I'll probably go for the "If...then" stuff, if anything, but I will definately test the "wait(1)" idea also. We shall see how it turns out...
Back to top
View user's profile Send private message
RPGCreations
E Pluribus Unum




Joined: 18 May 2003
Posts: 345

PostPosted: Mon Mar 01, 2004 6:12 am    Post subject: Reply with quote

You must use "wait for text box", as your current script basically is skipping the text box. This is actually useful if you want to plotscript textbox trees without having to mess with them in CUSTOM.EXE, but since that's not you want to do:

Code:
showtextbox(#)
wait for text box
advance text box


That being said, you would probably be better off using the music plotscript commands instead of this funky textbox method.
_________________
Back to top
View user's profile Send private message
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Mon Mar 01, 2004 12:53 pm    Post subject: Reply with quote

He is trying to skip the textbox. (While still having the effects of the textbox take place)
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
RPGCreations
E Pluribus Unum




Joined: 18 May 2003
Posts: 345

PostPosted: Mon Mar 01, 2004 1:59 pm    Post subject: Reply with quote

The Mad Cacti wrote:
He is trying to skip the textbox. (While still having the effects of the textbox take place)


Yeah. What I meant by skipping is that it never loads up the textbox in the first place. It's the way James had GAME.EXE's HSpeak interpreter work, I'm sure he could step in and explain it better than I could why it does that.
_________________
Back to top
View user's profile Send private message
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Tue Mar 02, 2004 2:22 am    Post subject: Reply with quote

I believe the reason it does that is because as the HS interpreter reads through scripts, it writes down the things that need to be done, eg moving npcs, hero, displaying backdrops, textboxs. These things aren't actually done until the end of the interpreter cycle, when a wait is encountered. So if you display a textbox, and then advance it, the advance command tells the text box ... do-er... to advance (in this case close) the textbox before it even initiates enacting the textbox.

I deduced all this from HS files and logic. (I wonder how close I am? : o)

We already solved this by putting in a wait(1).
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
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