Non-threaded

Forums » Advanced Editor Forum » Read Thread

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

Certain Background

10 years ago

Hi there!  I need help to set a certain background for all pages in my game.  I tried:

$PAGETEXT := $PAGETEXT + "<body background='URL'>"

but it doesn't seem to be working.  Anything else I could try?

Certain Background

10 years ago

Accord to Quiller, this works:

$PAGETEXT := "<html><style>body
{background: url('URL') ;}</style></html>"
+ $PAGETEXT

Certain Background

10 years ago

As I've said before... I'm a newb...  I can't quite seem to get it to work...

Certain Background

10 years ago

Well what you suggested previously doesn't work anymore anyway...

What part is tripping you up?

Certain Background

10 years ago

The simple: {background: url('URL') ;}

I don't know where to insert the URL (I'm assuming where it says 'URL', but it doesn't work).

Certain Background

10 years ago

You're right, that's where you put it.

Copy and paste exactly what you have in your page script right now.

Certain Background

10 years ago

Sorry for the delay in response.  It's definitely not working, but it may just be because my scripts aren't working.

Certain Background

10 years ago

Then copy and paste what you have. It may be a syntax error or something. 

Certain Background

10 years ago

Well... the image is supposed to be a secret, so I'll link a random url.

$PAGETEXT := "<html><style>body {background: http://chooseyourstory.com/ ;}</style></html>"
 + $PAGETEXT

Certain Background

10 years ago

Yeah, that's the wrong syntax.

$PAGETEXT := "<html><style>body {background: url('http://chooseyourstory.com/') ;}</style></html>" + $PAGETEXT

Should be what you have.

Certain Background

10 years ago

WOO!! It works!  But now this script overrides my "cover" page, so now my "cover page (example) is the same as the other pages.  Is there a way to set this title page as a different background?

Certain Background

10 years ago

Yeah, just add an if statement. Find out what page number your first page is, then go:

IF $PAGEID != ## THEN BEGIN
$PAGETEXT := "<html><style>body {background: url('http://chooseyourstory.com/') ;}</style></html>" + $PAGETEXT
END

Replace ## with the first page number.
 

Certain Background

10 years ago

Are you a wizard!?

 

 

 

 

That's awesome!  Thanks!

 

Certain Background

10 years ago

^Yes. Yes he is. And he sometimes wears fuzzy cat ears, but that is an unrelated statement (unless by wizard you meant wu-jen).