Hi im kinda new with AC but getting the hang of it
working with the invector shooter 1.1.5 and having a couple of issues
I follow this tutorial for Player Switching
https://adventurecreator.org/tutorials/switching-player-character-mid-gamebut in the moment when the player the switch has to happen the player just dissapears but the game still running
All the players have the invector ac link and the player scripts in order. I follow step by step the tutorial i don't know what is the problem this is the console error
GameObject vThirdPersonCamera was not saved because it does not have a 'Constant ID' script - please exit Play mode and attach one to it.
-> AC debug logger
UnityEngine.Debug:LogWarning(Object, Object)
AC.ACDebug:LogWarning(Object, Object) (at Assets/AdventureCreator/Scripts/Static/ACDebug.cs:29)
AC.Serializer:GetConstantID(GameObject) (at Assets/AdventureCreator/Scripts/Save system/Serializer.cs:165)
AC.MainCamera:SaveData(PlayerData) (at Assets/AdventureCreator/Scripts/Camera/MainCamera.cs:1828)
AC.SaveSystem:SavePlayerData(Player) (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:966)
AC.SaveSystem:SaveCurrentPlayerData() (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:946)
AC.ActionPlayerSwitch:Run() (at Assets/AdventureCreator/Scripts/Actions/ActionPlayerSwitch.cs:95)
AC.<RunAction>c__Iterator2:MoveNext() (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:342)
UnityEngine.MonoBehaviour:StartCoroutine(String, Object)
AC.ActionList:ProcessAction(Int32) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:306)
AC.ActionList:BeginActionList(Int32, Boolean) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:274)
AC.ActionList:Interact(Int32, Boolean) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:185)
AC.ActionList:Interact() (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:154)
AC.AC_Trigger:Interact(GameObject) (at Assets/AdventureCreator/Scripts/Logic/AC_Trigger.cs:71)
AC.AC_Trigger:OnTriggerEnter(Collider) (at Assets/AdventureCreator/Scripts/Logic/AC_Trigger.cs:79)
And having another problem when the player dies this one i have a video
https://www.youtube.com/watch?v=aVm_5rWPAiEI aprreciate any help
Comments
The Console message is not a bug, but a warning that should be followed. Just attach a Constant ID component to your vThirdPersonCamera object in your scene. It's not related to the player-switching however.
As you are using custom scripts, we will first need to determine if they are interfering and causing the problem. Remove anything except AC scripts (you can do this in a separate duplicate project to test with), and get it working when only AC is involved. If you have trouble in this case, please share details of how/when exactly you switch player in the form of screenshots of your ActionList and Settings Manager, as well as any messages that appear in the Console. Once the problem lies with the fact that additional addons are involved, please share more details about exactly how those addons are integrated into your project.
As far as the player "dying", AC doesn't have a concept of characters being killed - so this'll be down to your Invector integration. When the player dies, is he being removed from the scene? If so, you'll either need to prevent this from occuring (so that the same object merely resets their position), or call AC's ResetPlayer static method manually after they have been removed.
with not any other add on instaled. So is positive is problem of AC with the invector controller. I made some experiments
So i can make the player can change from the one with the invector controller
to the tin pot prefab character made enterely with AC.
But i can't make an Invector charater switching to another Invector character
any idea how to fix that
thank you
What happens exactly at the moment the switch should occur? Does the invector player get removed from the scene? What change occurs to the Hierarchy? Please provide as much detail as you can - since you are using a third-party asset together with a custom script to connect it with AC, it is a problem unique to your project - so I can only go by the detail you give me to give advice.
the persinstent engine and the Vgame controller are intact but the player instance is dissapear
i leave it a small video
https://www.youtube.com/watch?v=Wu-xhNSvjyw&feature=youtu.be
https://www.facebook.com/photo.php?fbid=10203882404697837&set=pcb.10203882410377979&type=3&theater
https://www.facebook.com/photo.php?fbid=10203882404297827&set=pcb.10203882410377979&type=3&theater
here the switch info and Both of the players have exactly the same stuff
so i put it i one page. And the scene manager
To keep filesizes minimal, you can duplicate the project and remove any unnecessary assets (AC demo folders included), and keep only the one scene to test with.
i've the same exactly issue of Kendall.
I use the last version of AC and INVECTOR SHOOTER.
Have you find a solution? Thanks!
Paolo
Also, if a try to switch from a PLAYER INVECTOR to a PLAYER AC all works.
But from a PLAYER INVECTOR to a PLAYER INVECTOR the first player desappear but the second player don't be instantiate in the scene. If i push the third time the button's switch the first player is instantiated correctly. Thanks
I've written a workaround script for you which should mitigate it here: http://pasteall.org/907908/csharp
To use it, paste it into a new C# script named "InvPlayerFix.cs" and attach it to a new GameObject in your scene.
You should, however, contact the author of the asset in question in case a more suitable fix is necessary.
I'm so happy!
There is a little change to make in the header for work correctly in my version:
using Invector.CharacterController;
i've change the line in:
using Invector.vCharacterController;
Many Thanks!
Paolo
When i come from the scene menu and i select the "Scene 1", the default player don't move. In the Console i read: "There is already a virtual axis named Vertical registered." and "There is already a virtual axis named Orizzontal registered."
If i play the "Scene 1" directly, without the scene menu all work.
Do you have any idea? Thanks.
***UPDATE***
I've try to create a new empty scene menu (whitout AC structure folder) and i have placed a button that load the SCENE 1. In this way work. Obviously, I would like to use a AC scene for my scene menu.