[Solved]About visual novel framework.
-
- Posts: 80
- Joined: Sun Jul 17, 2016 3:38 pm
[Solved]About visual novel framework.
Good day everyone! Right now, I'm working for a visual novel. Right now, I don't have an idea what script to use to change the background image during the scene on conversation.
I have 2 background, the bedroom and the dining room. What will happen is, the character will wake up early in the morning then fix the bed. After that, the background image will change into the dining table/room.
Here goes my questions:
1. Is it possible to change these background images just putting a script inside the script textbox? or Is there any other method to make it happen?
2. I have a music playing when the game starts, good thing its stop when clicking the "start button." But when I put music together in different panels. Both of them starts to play. What should happen is a there is a music playing on main menu, which is done already and when the game starts or changing scenery the music will change . How to play these audio on different sceneries?
Sorry for a lot of questions, I'm just a newbie. Thanks a lot.
I have 2 background, the bedroom and the dining room. What will happen is, the character will wake up early in the morning then fix the bed. After that, the background image will change into the dining table/room.
Here goes my questions:
1. Is it possible to change these background images just putting a script inside the script textbox? or Is there any other method to make it happen?
2. I have a music playing when the game starts, good thing its stop when clicking the "start button." But when I put music together in different panels. Both of them starts to play. What should happen is a there is a music playing on main menu, which is done already and when the game starts or changing scenery the music will change . How to play these audio on different sceneries?
Sorry for a lot of questions, I'm just a newbie. Thanks a lot.
Last edited by HaiiroMukuro on Wed Aug 03, 2016 3:34 pm, edited 1 time in total.
Re: About visual novel framework.
Hi,
I recommend using the SetActive() sequencer command to change background images by enabling and disabling GameObjects. Use the Sequence field. For example, say your background image is on a GameObject named "France Background". Put this in the START node's Sequence:
You can disable a GameObject by adding "false" to the end of the command:
You can also use the Audio() sequencer command to change the music. Let's say you've added an Audio Source component to a GameObject named "Music". You can tell it to play a song named "French Song" by adding an Audio() command:
Note the semicolon ( ; ) at the end of SetActive. This separates the SetActive() command from the Audio() command.
The final step is moving the file "French Song" into a folder named "Resources". This folder can be anywhere in your project, and you can have as many "Resources" folders as you want.
I recommend using the SetActive() sequencer command to change background images by enabling and disabling GameObjects. Use the Sequence field. For example, say your background image is on a GameObject named "France Background". Put this in the START node's Sequence:
You can disable a GameObject by adding "false" to the end of the command:
Code: Select all
SetActive(China Background, false)
Code: Select all
SetActive(France Background);
Audio(French Song, Music)
The final step is moving the file "French Song" into a folder named "Resources". This folder can be anywhere in your project, and you can have as many "Resources" folders as you want.
-
- Posts: 80
- Joined: Sun Jul 17, 2016 3:38 pm
Re: About visual novel framework.
Thanks a lot!
I set two sounds as a game object, when I start the game both of them are playing, how can I disable the other one while another one is playing?
I set two sounds as a game object, when I start the game both of them are playing, how can I disable the other one while another one is playing?
Re: About visual novel framework.
In your Sequence, you can use SetActive() to deactivate the GameObject containing the Audio Source, or SetEnabled() to disable just the Audio Source component. For example, let's say the Audio Source is on your Main Camera GameObject:
Code: Select all
SetEnabled(AudioSource, false, Main Camera)
-
- Posts: 80
- Joined: Sun Jul 17, 2016 3:38 pm
Re: About visual novel framework.
Thanks a lot! It's working now. It is possible also for scene transition?
Re: About visual novel framework.
It's possible to change scenes, but the visual novel framework was originally designed to run in one scene.
To change scenes, use the LoadLevel() sequencer command.
Also add a LevelManager component to the Dialogue Manager so it can record the current scene in saved games.
To change scenes, use the LoadLevel() sequencer command.
Also add a LevelManager component to the Dialogue Manager so it can record the current scene in saved games.
-
- Posts: 80
- Joined: Sun Jul 17, 2016 3:38 pm
Re: About visual novel framework.
What should I put inside the Default Starting Level? The current scene or the next scene?
Re: About visual novel framework.
The current scene.
-
- Posts: 80
- Joined: Sun Jul 17, 2016 3:38 pm
Re: About visual novel framework.
I'm still having problems with the sequence. I've change my method, I use the sequence trigger and sets the trigger on the end of the conversation. What happen is the music is playing on the scene suppose to loaded but the canvas still remains on the previous scene. In other words, in the end of the conversation, nothing loads but only music. I'm thinking if I forgot to put script or a component on the scene suppose to be loaded or on the current scene.
Re: About visual novel framework.
Hi,
Can you please post your current sequences here?
Can you please post your current sequences here?