Page 1 of 1

How to: change 2D background image for a visual novel

Posted: Mon Jan 13, 2020 8:07 pm
by erasmo.rayon
Hello!

I'm working on a visual novel wherein the player has shipwrecked and must search for his crew and supplies in order to survive. Naturally, there are many locations to explore (caves, abandoned temples, jungles, villages, etc.), but I'm not sure how to change the background art using the dialogue system.

I'm not much of a programmer but is there any function, variable or tool that would allow me to change the background of my scene based on which dialogue is currently playing?

I'm using Dialogue System ver. 2.2.3 with PlayMaker

Re: How to: change 2D background image for a visual novel

Posted: Mon Jan 13, 2020 9:38 pm
by Tony Li
Hi!

If you're using the free visual novel starter framework available on the Dialogue System Extras page, use step 12.b.4 on page 7 of the manual.

Otherwise, here are some ideas:

- No programming: Add all of the background images to the scene. Give them unique names. Set them all inactive. When your conversation gets to a dialogue entry node where you want to change the background image, use the SetActive() sequencer command to deactivate the old image and activate the new one. For example, say you want to hide the image named Caves and show the image named Temple. Set the Sequence field to this:

Code: Select all

SetActive(Caves, false);
SetActive(Temple, true);
{{default}}
(The {{default}} makes the Sequence also play the Dialogue Manager's Default Sequence.)

- A little programming: Write a custom sequencer command to change background images.

- PlayMaker: Use the FSMEvent() sequencer command to send an event to a PlayMaker FSM. In the FSM, change the background image.

Re: How to: change 2D background image for a visual novel (SOLVED)

Posted: Wed Jan 15, 2020 1:19 pm
by erasmo.rayon
Thanks Tony!

Re: How to: change 2D background image for a visual novel

Posted: Wed Jan 15, 2020 1:23 pm
by Tony Li
Happy to help!