Page 1 of 1

OPSIVE Save

Posted: Thu Jan 14, 2021 5:42 am
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?

Re: OPSIVE Save

Posted: Thu Jan 14, 2021 8:52 am
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.

Re: OPSIVE Save

Posted: Thu Jan 14, 2021 10:33 am
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

Re: OPSIVE Save

Posted: Thu Jan 14, 2021 10:35 am
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.

Re: OPSIVE Save

Posted: Thu Jan 14, 2021 11:31 am
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 :)

Re: OPSIVE Save

Posted: Thu Jan 14, 2021 2:01 pm
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.

Re: OPSIVE Save

Posted: Fri Jan 15, 2021 5:47 am
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?

Re: OPSIVE Save

Posted: Fri Jan 15, 2021 8:41 am
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.