Possible sequencerCommand LoadLevel in TPC

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
PCGuest0
Posts: 5
Joined: Fri Dec 02, 2022 3:48 am

Possible sequencerCommand LoadLevel in TPC

Post by PCGuest0 »

Hi Tony,
Since updated to Version3 of Opsive TPC, the previously flawless " sequencerCommand LoadLevel(Level,spawnpoint) is no longer working properly.

After loading the new level, the Player model is correctly at the designated target, but the MainCamera stays behind at where it was triggered, neither following nor able to control the Player. I have tried & unable to solve the problem. Can you reproduce this on your end?

V3 of UCC setup slightly different now with Character IK scripts etc moved to a lower hierarchy, not sure if this affecting it. FYI below is the only continuous errors I got after triggered loadlevel;

NullReferenceException: Object reference not set to an instance of an object
Opsive.UltimateCharacterController.Character.CharacterLocomotion.UpdatePosition () (at Assets/Opsive/UltimateCharacterController/Scripts/Character/CharacterLocomotion.cs:774)
User avatar
Tony Li
Posts: 21957
Joined: Thu Jul 18, 2013 1:27 pm

Re: Possible sequencerCommand LoadLevel in TPC

Post by Tony Li »

Hi,

Have you added a UCCSaver component to the new scene's player? Make sure to tick its Save Position checkbox.
PCGuest0
Posts: 5
Joined: Fri Dec 02, 2022 3:48 am

Re: Possible sequencerCommand LoadLevel in TPC

Post by PCGuest0 »

It has the Position Saver on before & works fine. Now I removed it and add a UCC Saver, with all options checked except "Restore State .." &"Append Saver Type to Key". But also tried all options selected.

The spawning is correct, however the player is unequipped after spawned, even if he was holding a weapon before. With Position Saver this problem didn't exist. Do you know the reason for that?
User avatar
Tony Li
Posts: 21957
Joined: Thu Jul 18, 2013 1:27 pm

Re: Possible sequencerCommand LoadLevel in TPC

Post by Tony Li »

Hi,

Did you assign a unique Key value?
This key should be the same for the player GameObject in all scenes.

Is Save Inventory ticked?

Are the items in the item database assigned to the player?

Are there any errors or warnings in the Console?
PCGuest0
Posts: 5
Joined: Fri Dec 02, 2022 3:48 am

Re: Possible sequencerCommand LoadLevel in TPC

Post by PCGuest0 »

Yes the options are checked, I tested them all or in different combinations. No errors. My Inventory datasystem works fine & assigned. Upon a closer look I found there could be more complex of an issues than originally thought. But I think if the Menual2X on your site is up to date, I will try to solve it locally first. I just wanted to verify a few things below;

Provided that I use both UIS + UCC(Third person but that shouldn't matter);
Do I have to use both UCC Saver & UIS Saver? Assuming the Position Saver is not needed. I understand now there are some redundant boxes appear on both Savers or more that I have to untick or tick, such as "Save Inventory"

I'll be back for more questions if things don't go well, until then thanks!
User avatar
Tony Li
Posts: 21957
Joined: Thu Jul 18, 2013 1:27 pm

Re: Possible sequencerCommand LoadLevel in TPC

Post by Tony Li »

Hi,

Use both savers. Since you're using UIS, UNtick the UCCSaver's Save Inventory checkbox.
Post Reply