Duplicate Player on Load (Corgi Engine)
Posted: Sun Oct 24, 2021 11:13 am
Hello!
Thank you so much for your wonderful asset! I've been learning how to use the dialogue system with Corgi Engine.
I'm mostly getting everything to work but there's one thing that I haven't been able to do correctly and I'm unsure if it's coming from Dialogue System or if it's from Corgi.
In my scene I have Player and NPC. Every level is set up that it reloads every time NPC dies and I'm doing this using a Dialogue System Trigger whenever NPC hits the collider it triggers a game over scene and player is loaded back to their initial spawn point. I've managed to also get the NPC to reload to their initial spawn point as well. The problem I'm running into is these:
1. Whenever the scene reloads, multiple instances of my Player is reloaded with each Game Over conversation, with sometimes the duplicate Player spawning in different locations in the scene (varies from Player spawning near the initial spawn location, sometimes where the Game Over conversation is triggered).
2. (Sometimes) The NPC that spawns can't move left or right (they can jump though) but can be interacted with.
3. In some occasions, the Player and NPC spawns correctly but their movement speed is super slowed down for some reason and sometimes the Player floats into the ceiling.
4. Sometimes whenever a conversation ends, the Player freezes and cannot move. (Disallow movement, can only activate if grounded, prevent jumps are all unticked)
I've tried multiple ways of reloading the scene such as using the Load Level command with the spawnpoint location or loading the scene from Save Helper via Restart Level. I've tried using the spawnpoint game object or using the Level Start (Checkpoint) component that comes with Corgi Engine. The Player and NPC have Position Savers component. I'm using this with the Menu Framework as well. I'm not getting any other console problems other than this:
NullReferenceException: Object reference not set to an instance of an object
PixelCrushers.DialogueSystem.CorgiEngineSupport.ConversationZone.DisallowMovement () (at Assets/Pixel Crushers/Dialogue System/Third Party Support/Corgi Support/Scripts/ConversationZone.cs:250)
I apologize in advance if this is a simple problem! I would really appreciate any pointers in the right direction. Thank you so much for your time!
Thank you so much for your wonderful asset! I've been learning how to use the dialogue system with Corgi Engine.
I'm mostly getting everything to work but there's one thing that I haven't been able to do correctly and I'm unsure if it's coming from Dialogue System or if it's from Corgi.
In my scene I have Player and NPC. Every level is set up that it reloads every time NPC dies and I'm doing this using a Dialogue System Trigger whenever NPC hits the collider it triggers a game over scene and player is loaded back to their initial spawn point. I've managed to also get the NPC to reload to their initial spawn point as well. The problem I'm running into is these:
1. Whenever the scene reloads, multiple instances of my Player is reloaded with each Game Over conversation, with sometimes the duplicate Player spawning in different locations in the scene (varies from Player spawning near the initial spawn location, sometimes where the Game Over conversation is triggered).
2. (Sometimes) The NPC that spawns can't move left or right (they can jump though) but can be interacted with.
3. In some occasions, the Player and NPC spawns correctly but their movement speed is super slowed down for some reason and sometimes the Player floats into the ceiling.
4. Sometimes whenever a conversation ends, the Player freezes and cannot move. (Disallow movement, can only activate if grounded, prevent jumps are all unticked)
I've tried multiple ways of reloading the scene such as using the Load Level command with the spawnpoint location or loading the scene from Save Helper via Restart Level. I've tried using the spawnpoint game object or using the Level Start (Checkpoint) component that comes with Corgi Engine. The Player and NPC have Position Savers component. I'm using this with the Menu Framework as well. I'm not getting any other console problems other than this:
NullReferenceException: Object reference not set to an instance of an object
PixelCrushers.DialogueSystem.CorgiEngineSupport.ConversationZone.DisallowMovement () (at Assets/Pixel Crushers/Dialogue System/Third Party Support/Corgi Support/Scripts/ConversationZone.cs:250)
I apologize in advance if this is a simple problem! I would really appreciate any pointers in the right direction. Thank you so much for your time!