Non-threaded

Forums » Advanced Editor Forum » Read Thread

Get help from the experts on variables, scripts, items, and other scary things.

Image/no image mode; font color; global script

5 years ago
I have received feedback on my preference for images. Some people like it, some people don't. The problem with background images for the latter crowd is that they often require colored font. So, to get to the point:

Are there any suggestions on how to use a variable and global script to:

(1) Allow a user to play with or without images

(2) Overrule on-page colored fonts and turn them to default black if the player chooses to play with no images or no background images.

Here is what I have so far, but I'm hoping for something better (using .'s to make the script not appear as script).

(a) Use on page variables (e.g., %.%.USEBACKGROUNDIMAGES.%.=.%.0.% <.style blah blah font color black, blah blah > .% and next to that write %.%.USEBACKGROUNDIMAGES.%.=.%.1.% <.style blah blah insert image blah blah font color orange, blah blah > .% to determine the font color (black for no background images, whatever necessary color if there IS a background image).

(b) And in global script have a variable dependent white background image that it defaults to if the variable is 0.

Unfortunately for this method, I'd have to use that on every single paragraph on every single page. Also, I'm not even entirely sure if that would work, although I have used that technique to make images appear or not. I'm just not sure about font. Either way, that's what I got so far.

Any suggestions on a better way? Thanks.

Image/no image mode; font color; global script

5 years ago
An IF statement in the global script that puts the images on the page and sets the font?

But if you are putting different fonts and different images on each page on the page script, then you'd have to use the IF statement in every page, yes, but you already have the information on every page, anyway, so no big deal.

Image/no image mode; font color; global script

5 years ago
I figured that would be the best way to do it. I appreciate the swift response.

Image/no image mode; font color; global script

5 years ago
Now if it were me, and this might be more complex, but I think it would be easier to maintain -- I'd put all the script and information in one place. I'd probably set up a global script that has one block with the single IF statement to determine if I was supposed to add pictures and colors. If it was yes, then I've have in that block all sorts of additional IF statements so that if the page was between 1 and 20, then it would have picture x and color a. But if the page was between 20 and 40, then it would have picture y and color b.

As I say, that might be pretty complex on the one script, but it would put everything in one place to work with.

Image/no image mode; font color; global script

5 years ago
If I could do that, that would actually save a butt load of time. All I'd have to worry about is font and spacing.

So I suppose it would like like this?

IF

ELSE IF

ELSE IF

...

ELSE IF

with the specific page number and picture information in there?

Image/no image mode; font color; global script

5 years ago
Yup. But don't forget the fine details (and you probably know this):

IF ... THEN
BEGIN

END
ELSE IF ... THEN
BEGIN

END

...

Image/no image mode; font color; global script

5 years ago
Did not know about “END.” Is that actually something you put in to close an extended if/then/else? Or did you just write it to show that the script is done? (If it’s supposed to be there, I’m pretty sure I didn’t have it in The Ghost People or the game I’m working on now and there have been no disastrous results.)

Image/no image mode; font color; global script

5 years ago
The END matches with the BEGIN. It is how you can put in multiple statements or commands in an IF statement. They're not required if you only have one statement in your IF clause, but if you have more than one, it is the only way to get it to work right.

Image/no image mode; font color; global script

5 years ago
Thanks. Probably saved me about six hours of troubleshooting ??