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

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
erasmo.rayon
Posts: 7
Joined: Thu Nov 28, 2019 2:40 pm

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

Post 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
User avatar
Tony Li
Posts: 21684
Joined: Thu Jul 18, 2013 1:27 pm

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

Post 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.
erasmo.rayon
Posts: 7
Joined: Thu Nov 28, 2019 2:40 pm

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

Post by erasmo.rayon »

Thanks Tony!
User avatar
Tony Li
Posts: 21684
Joined: Thu Jul 18, 2013 1:27 pm

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

Post by Tony Li »

Happy to help!
Post Reply