Hey there folks,
Unity Ver: 2018.2.2f1
AC Ver: 1.64.1
I'm starting to build out the opening narrative for my game but I've hit abit of a road block with conversations disabling gameplay.
Here's a GIF of the problem:
When dialogue is taking place, I want the player to retain control of movement. This is what you can see at the start of the GIF.
What happens though, is after the first conversation option is selected gameplay becomes frozen. The player cannot move subsequently after selecting a piece of conversation.
How can I fix that?
What I want is the player to be frozen only at the point of needing to select a conversation option. At all other times they should have free movement and normal gameplay.
This is the Action List which is being used during the GIF. It is set to 'run in background'.:
It's almost like at the point of the green arrow, that's when things seem to change.
Enabling "Allow regular gameplay during Converations" in AC settings doesn't seem to help, because what that means is that the player can move around while conversation options are on screen which is also undesired in this case.
Grateful for any help.
Many thanks as always.
Comments
if (KickStarter.stateHandler.gameState == AC.GameState.DialogOptions) { return; }
void Update() { //Check for firing FireProjectile(); } void FireProjectile() { //On left mouse button pressed if (Input.GetMouseButtonDown(0)) { //Create the linked prefab of the active inventory slot as a gameobject activeProjectile = Instantiate(AC.KickStarter.runtimeInventory.GetItem(InventorySelection.activeInventorySlot).linkedPrefab, projectileSpawn.position, projectileSpawn.rotation) as GameObject; //Access it's rigid body component getRigidBody = activeProjectile.GetComponent(); //Apply a force to the rigid body getRigidBody.AddForce(projectileSpawn.forward * projectileForce); } } }
if(!KickStarter.stateHandler.IsInGameplay()) { return; }
IsInGameplay()
cannot be used anymore, I thought I could be clever and instead check the active gamestate via:AC.StateHandler.gameState
void Update() { //Return if we're showing dialog options. If so we don't want to process firing if (KickStarter.stateHandler.gameState == AC.GameState.DialogOptions) { return; } //Check for firing FireProjectile(); }