Updated Boss for Dialogue and End Game Dialogue

This commit is contained in:
Philip W 2023-05-13 16:25:07 +01:00
parent c6e5cb5e00
commit b8709401da
13 changed files with 34 additions and 37 deletions

BIN
Content/BlueprintAI/AI/AIBruh_Boss.uasset (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Content/Blueprints/Combat_UI/EndDialogue.uasset (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Content/Dialogue/TextPrompt.uasset (Stored with Git LFS)

Binary file not shown.

BIN
Content/Levels/Build.umap (Stored with Git LFS)

Binary file not shown.

BIN
Content/Levels/Enemy_Test.umap (Stored with Git LFS)

Binary file not shown.

View File

@ -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<ACharacter>(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<ACharacter>(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<UDialoguePath>();
}

View File

@ -103,9 +103,9 @@ private:
TMap<int, int> ItemIndexes;
UPROPERTY()
TMap<int, FString> 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);

View File

@ -103,7 +103,7 @@ void ATurnBaseCombatV2::StartCombat(AActor* Enemy, const bool bWasShot)
void ATurnBaseCombatV2::CombatCheck(const bool bWasShot)
{
const UBlackboardComponent* EnemyBlackboard = Cast<AAIController>(EnemyActor->GetInstigatorController())->GetBlackboardComponent();
ChainDamageMultiplier = 0;
BaseDamageMultiplier = DefaultBaseDamageMultiplier;
EnemyBaseDamageMultiplier = DefaultEnemyBaseDamageMultiplier;