OPSIVE Save

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Smugz
Posts: 12
Joined: Mon Jan 04, 2021 10:05 pm

OPSIVE Save

Post by Smugz »

Hi, I'm using the third person OPSIVE Character Controller and have created a dialogue manager in my scene, and also applied the UCC Saver to my character. I'm attempting to make an instanced interior so when you "enter a building" it loads a new scene and spawns you by the door, then when you leave the building it places you back outside, but when I enter and leave the building it respawns me at the default world spawn point and not where the player last was in the scene. I have tried setting this up twice and can't seem to get it working, am I missing something?
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: OPSIVE Save

Post by Tony Li »

Hi,

Are you using spawnpoints?

If you want to spawn the player by the door, check these things:
  • Player is tagged "Player"
  • Player has UCC Saver
  • UCC Saver's Save Position checkbox is ticked
  • You're changing scenes using a method that specifies a spawnpoint*
  • The scene has a GameObject whose name exactly matches the specified spawnpoint name
* To change scenes using a spawnpoint, see Changing Scenes.
Smugz
Posts: 12
Joined: Mon Jan 04, 2021 10:05 pm

Re: OPSIVE Save

Post by Smugz »

Hi, so I got that working. I used the Scene Portal component, is there a way to activate the scene portal on a button press rather than as soon as you enter the trigger? I'd like it to just pop up like "Press E to enter" and then it does the thing
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: OPSIVE Save

Post by Tony Li »

Hi,

If you want to use UCC's interaction system, set it up as an interactable. Set the Tag Mask to none. When interacted with, call the Scene Portal component's UsePortal() method.
Smugz
Posts: 12
Joined: Mon Jan 04, 2021 10:05 pm

Re: OPSIVE Save

Post by Smugz »

I'm a bit lost, so i've set the door up as an interactable and then added the ScenePortal component on the house itself, i've removed the required tag from the ScenePortal and on the interactable script on the door I've set the target to the house (ScenePortal), then I got somewhat lost with what to call and where, could you possibly explain where I went wrong like i'm 5? Thanks :)
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: OPSIVE Save

Post by Tony Li »

Hi,

If you're not comfortable writing a script that implements IInteractableTarget -- it has two methods, CanInteract() and Interact() -- then you can use a Dialogue System Trigger Interactable Target. Set it up exactly like the integration's interaction instructions, except instead of selecting Add Action > Start Conversation, select Add Action > OnExecute() Event. This will add a UnityEvent that you can hook up in the inspector. Click "+" to add a new element. Assign the Scene Portal. Select ScenePortal.UsePortal from the dropdown.
Smugz
Posts: 12
Joined: Mon Jan 04, 2021 10:05 pm

Re: OPSIVE Save

Post by Smugz »

yup got it working exactly how I wanted, thanks! :D

EDIT: There's actually another thing, for big scenes that take a while to load is there any simple way to implement a loading screen when using the Scene Portal?
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: OPSIVE Save

Post by Tony Li »

Yes. Use a Standard Scene Transition Manager. The Dialogue System Extras page has a "SaveSystemPrefabs" package (direct download) containing preconfigured prefabs and an example loading screen.
Post Reply