 |
Castle Paradox
|
View previous topic :: View next topic |
Author |
Message |
alphawolf
Joined: 17 Aug 2012 Posts: 33 Location: South Carolina, America
|
Posted: Sat May 18, 2013 6:39 am Post subject: Text Box Plotscripting |
|
|
Hey I'm back to CP! (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).  _________________ #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 |
|
 |
trevorh7441
Joined: 17 May 2013 Posts: 4
|
Posted: Sat May 18, 2013 7:34 am Post subject: |
|
|
I can send you a copy of the data I have so far if you want me to. |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Sat May 18, 2013 9:43 am Post subject: |
|
|
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 |
|
 |
alphawolf
Joined: 17 Aug 2012 Posts: 33 Location: South Carolina, America
|
Posted: Sat May 18, 2013 3:02 pm Post subject: |
|
|
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.  _________________ #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 |
|
 |
|
|
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
|