How to use the menu system that is on the extras page
Re: How to use the menu system that is on the extras page
Hi,
Yes, you can use the LoadLevel() sequencer command to change scenes. Keep in mind that changing a scene won't, by itself, end the conversation. But if the LoadLevel() command is on an end node, the conversation will naturally end, like this example:
I don't recall if you mentioned using any particular inventory system, so the example above uses the Dialogue System's Inventory Engine integration. The player response on the left checks if the player has zero of the required item. The response on the right checks if the player has the required item; if so, it loads the scene named "Schmargonrog".
Yes, you can use the LoadLevel() sequencer command to change scenes. Keep in mind that changing a scene won't, by itself, end the conversation. But if the LoadLevel() command is on an end node, the conversation will naturally end, like this example:
I don't recall if you mentioned using any particular inventory system, so the example above uses the Dialogue System's Inventory Engine integration. The player response on the left checks if the player has zero of the required item. The response on the right checks if the player has the required item; if so, it loads the scene named "Schmargonrog".
- Bond of Blood
- Posts: 21
- Joined: Wed Mar 22, 2023 7:59 pm
Re: How to use the menu system that is on the extras page
I am using the inventory engine. https://www.pixelcrushers.com/dialogue_ ... ngine.html
Re: How to use the menu system that is on the extras page
Perfect! That's what I used for the example screenshot above.
- Bond of Blood
- Posts: 21
- Joined: Wed Mar 22, 2023 7:59 pm
Re: How to use the menu system that is on the extras page
Ok thank you, how would I use this to say take money from a player or give them money or another item. Also should I not have a dialogue system prefab in each scene and just have the one from the main menu just persist like I think it does, same with the save system.
Re: How to use the menu system that is on the extras page
Assuming you define an item type (e.g., "gold") to use as money, use the Lua functions to give or take money.
You can have a Dialogue Manager prefab in every scene. This makes it easier to playtest a scene directly instead of having to play from the main menu scene. To set this up, I recommend configuring the main menu scene's Dialogue Manager prefab just the way you want. Then drag this prefab from the Hierarchy view into the Project view. This will let you create a Prefab Variant, which is a prefab that inherits its values from the original prefab, except for any customizations you've made to the prefab variant.
Then add this same prefab variant to your other scenes. This way, if you make a change to the prefab variant in the Project view, that change will be reflected in the Dialogue Managers in all of your scenes.
You can have a Dialogue Manager prefab in every scene. This makes it easier to playtest a scene directly instead of having to play from the main menu scene. To set this up, I recommend configuring the main menu scene's Dialogue Manager prefab just the way you want. Then drag this prefab from the Hierarchy view into the Project view. This will let you create a Prefab Variant, which is a prefab that inherits its values from the original prefab, except for any customizations you've made to the prefab variant.
Then add this same prefab variant to your other scenes. This way, if you make a change to the prefab variant in the Project view, that change will be reflected in the Dialogue Managers in all of your scenes.
- Bond of Blood
- Posts: 21
- Joined: Wed Mar 22, 2023 7:59 pm
Re: How to use the menu system that is on the extras page
Ok how would say I click on a door and load another scene?
Re: How to use the menu system that is on the extras page
If you're using the Dialogue System's Selector / Proximity Selector interaction system:
- Add a collider, Usable component, and Dialogue System Trigger to the door.
- If you're using a Selector, make sure the door's layer is set to a layer that's in the Selector's Layer Mask list.
- On the Dialogue System Trigger, select Add Action > Play Sequence.
- In the Sequence field, enter:where yourScene is the name of the scene to load.
Code: Select all
LoadLevel(yourScene)
- If you want the player to appear in the scene at the position of a specific GameObject (typically an empty GameObject) in the scene, use:where spawnpoint is the name of the GameObject. Then add a PositionSaver component to the player GameObject in the scene, and tick its Use Player Spawnpoint checkbox.
Code: Select all
LoadLevel(yourScene, spawnpoint)
- More info: LoadLevel()
- Bond of Blood
- Posts: 21
- Joined: Wed Mar 22, 2023 7:59 pm
Re: How to use the menu system that is on the extras page
When I walk up to the door I put the stuff on I don't get an interact to enter and nothing happens. I am not sure what I am doing wrong.
- Attachments
-
- image (7).png (62.61 KiB) Viewed 398 times
Re: How to use the menu system that is on the extras page
Hi,
Are you using a Selector component whose Select At dropdown is set to Mouse Position?
If not, there are other options. But my instructions above assume that this is what you're doing.
Are you using a Selector component whose Select At dropdown is set to Mouse Position?
If not, there are other options. But my instructions above assume that this is what you're doing.
- Bond of Blood
- Posts: 21
- Joined: Wed Mar 22, 2023 7:59 pm
Re: How to use the menu system that is on the extras page
Yes it was already like that. So I don't know what I am doing wrong.
- Attachments
-
- image (8).png (71.31 KiB) Viewed 390 times