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

Text Box Plotscripting

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




Joined: 17 Aug 2012
Posts: 33
Location: South Carolina, America

PostPosted: Sat May 18, 2013 6:39 am    Post subject: Text Box Plotscripting Reply with quote

Hey I'm back to CP! Raspberry! (And to Hamster Republic for that matter).

I remember when I was plotscripting before, there was a showtextbox() function. Are there any functions or commands for creating a text box inside a plotscript? I'm working with a partner (trevorh7441) in a project, and the abillity for me, the scripter, to be able to create the text boxes will make development go much faster.

(I'd much rather not have to ask him which ID each text box is). Oookay...
_________________
#AlphaWolf#

http://societyofdreamers.webs.com/ <-- poetry forum, visit if you'd like, it's almost as dead as this forum (hehe) but it's just started.

##Contact at cckisby-SPAM@gmail.com#
#Remove the -SPAM above to prove you're# #not a spambot :/##
##AlphaWolf Studios##
Back to top
View user's profile Send private message Visit poster's website
trevorh7441




Joined: 17 May 2013
Posts: 4

PostPosted: Sat May 18, 2013 7:34 am    Post subject: Reply with quote

I can send you a copy of the data I have so far if you want me to.
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: Sat May 18, 2013 9:43 am    Post subject: Reply with quote

Hi, welcome back! There are lots of approaches. One way is to have a template textbox, say box 1, with the following contents, and shrink set to "auto":

Code:
${S0}
${S1}
${S2}
${S3}
${S4}
${S5}
${S6}
${S7}


(Or choose any other 8 string IDs.) Then fill the strings with the right contents before showing the box:

Code:

$0 = "Bob:"
$1 = "   Spiffy spiffy!"
$2 = ""
...
$7 = ""
show text box(1)


It would be helpful to have a utility script to clear all the lines, so you don't need to explicitly clear the ones you're not using:

Code:
script, clear strings, begin
  $0 = ""
  ...
  $7 = ""
end

...

clear strings
$0 = "Bob:"
$1 = "   Spiffy spiffy!"
show text box(1)


The textbox will be resized automatically depending on how many of the strings are blank. You can also, in a non-obvious way, change the the position, colour and border of the box, or to add, change, or move a portrait image, by manipulating 'slices'. For example, the following changes the colour of the currently displaying textbox's box (non-permanently):

Code:
variable (box)
box := lookup slice (sl: textbox box)
set rect bg col (box, 144)  # replace 144 with one of your master palette indices


You can't change the textbox conditionals, but you can script those manually easily.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
alphawolf




Joined: 17 Aug 2012
Posts: 33
Location: South Carolina, America

PostPosted: Sat May 18, 2013 3:02 pm    Post subject: Reply with quote

Ah, thanks for replying! The approach you provided is well worth doing (I'm SO glad I've read up on hspeak's string commands prior to reading this), I think I'm going to get to work on that. That will make it much easier to script the dialouge. Raspberry!
_________________
#AlphaWolf#

http://societyofdreamers.webs.com/ <-- poetry forum, visit if you'd like, it's almost as dead as this forum (hehe) but it's just started.

##Contact at cckisby-SPAM@gmail.com#
#Remove the -SPAM above to prove you're# #not a spambot :/##
##AlphaWolf Studios##
Back to top
View user's profile Send private message Visit poster's website
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