From b8709401dafa951b6f8799a9b9699437469a104a Mon Sep 17 00:00:00 2001 From: PHILIP White Date: Sat, 13 May 2023 16:25:07 +0100 Subject: [PATCH] Updated Boss for Dialogue and End Game Dialogue --- ...t_improvement_textured_Cylinder_020.uasset | 4 ++-- Content/BlueprintAI/AI/AIBruh_Boss.uasset | 4 ++-- .../Combat_UI/BookWorldWidget.uasset | 4 ++-- .../Combat_UI/CombatCharacter.uasset | 4 ++-- .../Blueprints/Combat_UI/EndDialogue.uasset | 3 +++ .../Blueprints/Display_UI/BP_CrossHair.uasset | 4 ++-- Content/Dialogue/SM_Merchant_Blueprint.uasset | 4 ++-- Content/Dialogue/TextPrompt.uasset | 4 ++-- Content/Levels/Build.umap | 4 ++-- Content/Levels/Enemy_Test.umap | 4 ++-- .../Dialogue/DialogueNPC.cpp | 24 +++++++------------ .../the_twilight_abyss/Dialogue/DialogueNPC.h | 6 ++--- .../TurnBasedCombatV2/TurnBaseCombatV2.cpp | 2 +- 13 files changed, 34 insertions(+), 37 deletions(-) create mode 100644 Content/Blueprints/Combat_UI/EndDialogue.uasset diff --git a/Content/Assets/Objects/Updated_level_map/Level_1_Blockout_improvement_textured_Cylinder_020.uasset b/Content/Assets/Objects/Updated_level_map/Level_1_Blockout_improvement_textured_Cylinder_020.uasset index c9270e9..b465ff2 100644 --- a/Content/Assets/Objects/Updated_level_map/Level_1_Blockout_improvement_textured_Cylinder_020.uasset +++ b/Content/Assets/Objects/Updated_level_map/Level_1_Blockout_improvement_textured_Cylinder_020.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9bd4deedc592885ec1cbfbc9575472eb63e18b25ae2ead31aa46f7127fde5ced -size 83485 +oid sha256:e7da7141bfb557d305cf6535824601131c871cac28aeabef753997c4d71ce12f +size 83100 diff --git a/Content/BlueprintAI/AI/AIBruh_Boss.uasset b/Content/BlueprintAI/AI/AIBruh_Boss.uasset index 6d81571..d2d384d 100644 --- a/Content/BlueprintAI/AI/AIBruh_Boss.uasset +++ b/Content/BlueprintAI/AI/AIBruh_Boss.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b76dd11c5e7de7092a12c9f139ae21b21707645cd198c4bd5343f7d2501439d6 -size 143177 +oid sha256:744ada7cea6b4ddea4f8b3d73c05ff60e3e1f2ede4a84acd9b3665aefda380d0 +size 243507 diff --git a/Content/Blueprints/Combat_UI/BookWorldWidget.uasset b/Content/Blueprints/Combat_UI/BookWorldWidget.uasset index 757d9fd..d1a99a2 100644 --- a/Content/Blueprints/Combat_UI/BookWorldWidget.uasset +++ b/Content/Blueprints/Combat_UI/BookWorldWidget.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:38d13fd9a0a0a9c0af31988193b77e896f955dbe157f27653ad3e71b1d0c7307 -size 23737 +oid sha256:18c0ccf2461fc91a8a98bd252f47d9030792b1639f46f765247304f623e285fb +size 23709 diff --git a/Content/Blueprints/Combat_UI/CombatCharacter.uasset b/Content/Blueprints/Combat_UI/CombatCharacter.uasset index 581b455..433ae23 100644 --- a/Content/Blueprints/Combat_UI/CombatCharacter.uasset +++ b/Content/Blueprints/Combat_UI/CombatCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5499ca15a4fbf85a5013b5be304a4ac2d9e5e8138ff8f08cf727b06c5ff06581 -size 192882 +oid sha256:20332c43d47078e0f2a6b0c4571a0b3467541f7b1e60b8d4cd2cf4f45b1fc79f +size 192828 diff --git a/Content/Blueprints/Combat_UI/EndDialogue.uasset b/Content/Blueprints/Combat_UI/EndDialogue.uasset new file mode 100644 index 0000000..7d02b14 --- /dev/null +++ b/Content/Blueprints/Combat_UI/EndDialogue.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ea690f35f2dd2c6cf001cfb103b739005ba417c2e1abb5224cdfcb1c599451fa +size 88099 diff --git a/Content/Blueprints/Display_UI/BP_CrossHair.uasset b/Content/Blueprints/Display_UI/BP_CrossHair.uasset index 7effa0d..b5491ab 100644 --- a/Content/Blueprints/Display_UI/BP_CrossHair.uasset +++ b/Content/Blueprints/Display_UI/BP_CrossHair.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ebc8b81319654bead68a5f6f0544b6d71b8a58e9bda2f4e4f7c12bf64b2b2f09 -size 24335 +oid sha256:ed30c2313ba163a846fe0055fb38d1d6d0075bff1fa3a10d6be868c18a0d25f2 +size 24454 diff --git a/Content/Dialogue/SM_Merchant_Blueprint.uasset b/Content/Dialogue/SM_Merchant_Blueprint.uasset index c0026c0..b72d5a3 100644 --- a/Content/Dialogue/SM_Merchant_Blueprint.uasset +++ b/Content/Dialogue/SM_Merchant_Blueprint.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8a7bec9951b82b618fbc983c556342f661ded8d07ce021f63458865b343c236e -size 144185 +oid sha256:20bbef6327f60f9000e11a6288d9df0879065811d565d383486975562be2092f +size 144658 diff --git a/Content/Dialogue/TextPrompt.uasset b/Content/Dialogue/TextPrompt.uasset index 1f42113..3e68721 100644 --- a/Content/Dialogue/TextPrompt.uasset +++ b/Content/Dialogue/TextPrompt.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:83692ece4e17e312f60d0a66835228abf5be0489fb60c3d2821e6f4c3e1519f1 -size 60587 +oid sha256:034e24a559fc63e29d9c6e717aab12d04a67454171d3a239ceffba50fe683998 +size 60114 diff --git a/Content/Levels/Build.umap b/Content/Levels/Build.umap index de47feb..b6d8d90 100644 --- a/Content/Levels/Build.umap +++ b/Content/Levels/Build.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b84179d7f020dc0acdce0c01da9a9d0ddc9f7768a9e9a9eb315ea0adfc67e725 -size 3305721 +oid sha256:d26774c2aec62e7042c1bc7db91019c92641855e8f611ac4998131c447c6c61a +size 5429470 diff --git a/Content/Levels/Enemy_Test.umap b/Content/Levels/Enemy_Test.umap index cb9bcee..3a5df59 100644 --- a/Content/Levels/Enemy_Test.umap +++ b/Content/Levels/Enemy_Test.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aede3e25bfdba2a4612c55a6ff0a7fbe65853fa476d74750c3dd3295f7398d78 -size 45107 +oid sha256:a282b6a85c2fab895525bd055b513a454b26fd7aefab7aecda1ab4d12e55b13f +size 45572 diff --git a/Source/the_twilight_abyss/Dialogue/DialogueNPC.cpp b/Source/the_twilight_abyss/Dialogue/DialogueNPC.cpp index 88fcbe3..e3c41eb 100644 --- a/Source/the_twilight_abyss/Dialogue/DialogueNPC.cpp +++ b/Source/the_twilight_abyss/Dialogue/DialogueNPC.cpp @@ -70,7 +70,7 @@ void UDialogueNPC::NextDialogue() FOutputDeviceNull AR; const FString Command = BlueprintFunctions[UKismetStringLibrary::Conv_StringToInt(CurrentDialogueStringPath[DialogueIndex].RightChop(3))];; GetOwner()->CallFunctionByNameWithArguments(*Command, AR, nullptr, true); - if (Command == "OpenShop") bInShop = true; + if (Command == "OpenShop") bResetUserControls = false; DialogueIndex++; } else if (CurrentDialogueStringPath[FMath::Clamp(DialogueIndex + 1, 0, CurrentDialogueStringPath.Num() - 1)].Mid(0, 2) == "$$") @@ -139,7 +139,6 @@ void UDialogueNPC::TickComponent(float DeltaTime, ELevelTick TickType, FActorCom void UDialogueNPC::StartDialogue() { Quests.Empty(); - bInShop = false; FOutputDeviceNull AR; const FString Command = FString::Printf(TEXT("SetRootDialoguePath")); GetOwner()->CallFunctionByNameWithArguments(*Command, AR, nullptr, true); @@ -149,14 +148,11 @@ void UDialogueNPC::StartDialogue() UE_LOG(LogTemp, Warning, TEXT("Dialogue Path is Empty")); return; } - //Disable Character Movement - if (ACharacter* PlayerCharacter = Cast(GetWorld()->GetFirstPlayerController()->GetPawn())) - { - PlayerCharacter->DisableInput(GetWorld()->GetFirstPlayerController()); - } //Set to UI Mode Only APlayerController* PlayerController = GetWorld()->GetFirstPlayerController(); - PlayerController->SetInputMode(FInputModeUIOnly()); + PlayerController->SetIgnoreMoveInput(true); + PlayerController->SetIgnoreLookInput(true); + PlayerController->SetInputMode(FInputModeGameAndUI()); PlayerController->bShowMouseCursor = true; Choice1Button->SetVisibility(ESlateVisibility::Hidden); @@ -178,22 +174,20 @@ void UDialogueNPC::EndDialogue() TextAnimationTimerHandle.Invalidate(); DialogueWidgetInstance->RemoveFromParent(); - if (!bInShop) + if (bResetUserControls) { - //Enable Character Movement - if (ACharacter* PlayerCharacter = Cast(GetWorld()->GetFirstPlayerController()->GetPawn())) - { - PlayerCharacter->EnableInput(GetWorld()->GetFirstPlayerController()); - } //Reset UI Mode APlayerController* PlayerController = GetWorld()->GetFirstPlayerController(); + PlayerController->SetIgnoreMoveInput(false); + PlayerController->SetIgnoreLookInput(false); PlayerController->SetInputMode(FInputModeGameOnly()); PlayerController->bShowMouseCursor = false; } } -UDialoguePath* UDialogueNPC::CreateRootDialoguePath() +UDialoguePath* UDialogueNPC::CreateRootDialoguePath(const bool ResetUserControls) { + bResetUserControls = ResetUserControls; return NewObject(); } diff --git a/Source/the_twilight_abyss/Dialogue/DialogueNPC.h b/Source/the_twilight_abyss/Dialogue/DialogueNPC.h index e213c32..6efcc32 100644 --- a/Source/the_twilight_abyss/Dialogue/DialogueNPC.h +++ b/Source/the_twilight_abyss/Dialogue/DialogueNPC.h @@ -103,9 +103,9 @@ private: TMap ItemIndexes; UPROPERTY() TMap QuestFlags; - + UPROPERTY() - bool bInShop = false; + bool bResetUserControls = true; void ResetDialogueUI(); @@ -120,7 +120,7 @@ public: void EndDialogue(); UFUNCTION(BlueprintCallable) - UDialoguePath* CreateRootDialoguePath(); + UDialoguePath* CreateRootDialoguePath(bool ResetUserControls = true); UFUNCTION(BlueprintCallable) UDialoguePath* AddDialogue(UDialoguePath* DialoguePath, FText TextInput); diff --git a/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp b/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp index fbe47dc..0bdb479 100644 --- a/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp +++ b/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp @@ -103,7 +103,7 @@ void ATurnBaseCombatV2::StartCombat(AActor* Enemy, const bool bWasShot) void ATurnBaseCombatV2::CombatCheck(const bool bWasShot) { const UBlackboardComponent* EnemyBlackboard = Cast(EnemyActor->GetInstigatorController())->GetBlackboardComponent(); - + ChainDamageMultiplier = 0; BaseDamageMultiplier = DefaultBaseDamageMultiplier; EnemyBaseDamageMultiplier = DefaultEnemyBaseDamageMultiplier;