Hello,
In the game I am developing I have to change the main character model. The main/defaul character is an old man, but we have 2 scenes where you can control his young self. I have 3 and I have tried aproaching the player switch in 3 forms:
By not having character switch enabled and just placing the prefab on the scene
By having character switch enabled on and switching trough action lists
By having character switch enabled and using action lists with the prefab on the scene
all 3 forms lead to the same problem - If controlling a non-default player character, the player character gets deleted and a new default player spawns on 0,0,0 when a dialog or cutscene is skipped.
Am I doing something wrong or is this a bug?
Thanks in advance.
Comments
What version of AC are you using? If not the latest, update to v1.55c - we'll need to know if this is occuring in the latest version.
Yes this only occurs when skipping. Also occurs when skipping dialog in an unskippable cut scene (which also breaks the cutscene)
Can't reproduce from first attempt. Let's get some debug info - in KickStarter.cs, there's a function called ResetPlayer that's used to instantiate the player prefab into the scene. Assuming that the issue is that this is running inadvertently, place this in at the top of it after updating:
Debug.Log ("Switching player: " + ref_player + ", ID: " + ID);
If it then shows in the Console when the error occurs, post the full message as it appears in the Console window - including the script line references beneath.
Given the results of the last log, here's another one to place in ActionListManager.cs:
Debug.Log ("Resetting play because starting ID (" + playerIDOnStartQueue + ") does not match current player " + KickStarter.player.name + " (" + KickStarter.player.ID + ")");
Place this just above the line:
Player playerToRevertTo = KickStarter.settingsManager.GetPlayer (playerIDOnStartQueue);
Please also post a screenshot (hosted on e.g. imgur.com) showing the ActionList that causes the issue in full.
One more log, this time placed as the first line inside ActionListManager's CanAddToSkipQueue function:
Debug.Log ("Adding " + actionList.name + " to skip queue (" + originalValue + ") - Skippable? " + actionList.IsSkippable () + ", In Skippable Cutscene? " + KickStarter.actionListManager.IsInSkippableCutscene () + ", Played ID: " + KickStarter.player.ID);
I shall PM you an updated scripts package to test shortly, though that'll be a separate test - please let me know the result of the above as well.