Implemented Simple Bounty Alterations
This commit is contained in:
parent
3c1d16c967
commit
c6db0146e4
@ -93,4 +93,26 @@ void ABountyClass::CollectRewards_Implementation()
|
||||
UE_LOG(LogTemp, Warning, TEXT("The player has gained $%d for completing the bounty!"), RewardMoney);
|
||||
}
|
||||
|
||||
void ABountyClass::BuySpawnAmmoDrops()
|
||||
{
|
||||
FActorSpawnParameters SpawnParameters;
|
||||
SpawnParameters.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AlwaysSpawn;
|
||||
for (FTransform Spawn : AmmoDropSpawnTransforms)
|
||||
{
|
||||
GetWorld()->SpawnActor<AActor>(AmmoDropClass, Spawn.GetLocation(), Spawn.GetRotation().Rotator(), SpawnParameters);
|
||||
}
|
||||
}
|
||||
|
||||
void ABountyClass::BuySpawnHealthDrops()
|
||||
{
|
||||
FActorSpawnParameters SpawnParameters;
|
||||
SpawnParameters.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AlwaysSpawn;
|
||||
for (FTransform Spawn : HealthDropSpawnTransforms)
|
||||
{
|
||||
GetWorld()->SpawnActor<AActor>(HealthDropClass, Spawn.GetLocation(), Spawn.GetRotation().Rotator(), SpawnParameters);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -35,15 +35,38 @@ protected:
|
||||
|
||||
UPROPERTY(EditDefaultsOnly, Category = "Bounty")
|
||||
FString BountyDesc;
|
||||
// ---------------- Bounty Alterations ----------------
|
||||
UPROPERTY(EditDefaultsOnly, Category = "Bounty")
|
||||
FString CustomBountyAlteration_1_Description;
|
||||
|
||||
UPROPERTY(EditDefaultsOnly, Category = "Bounty")
|
||||
FString CustomAlteringEffect1_Description;
|
||||
int CustomBountyAlteration_1_Cost = 2;
|
||||
|
||||
UPROPERTY(EditDefaultsOnly, Category = "Bounty")
|
||||
FString CustomAlteringEffect2_Description;
|
||||
FString CustomBountyAlteration_2_Description;
|
||||
|
||||
UPROPERTY(EditDefaultsOnly, Category = "Bounty")
|
||||
FString CustomAlteringEffect3_Description;
|
||||
int CustomBountyAlteration_2_Cost = 2;
|
||||
|
||||
UPROPERTY(EditDefaultsOnly, Category = "Bounty")
|
||||
FString CustomBountyAlteration_3_Description;
|
||||
|
||||
UPROPERTY(EditDefaultsOnly, Category = "Bounty")
|
||||
int CustomBountyAlteration_3_Cost = 2;
|
||||
|
||||
UPROPERTY(EditDefaultsOnly, Category = "Bounty")
|
||||
TArray<FTransform> AmmoDropSpawnTransforms;
|
||||
|
||||
UPROPERTY(EditDefaultsOnly, Category = "Bounty")
|
||||
TSubclassOf<AActor> AmmoDropClass;
|
||||
|
||||
UPROPERTY(EditDefaultsOnly, Category = "Bounty")
|
||||
TArray<FTransform> HealthDropSpawnTransforms;
|
||||
|
||||
UPROPERTY(EditDefaultsOnly, Category = "Bounty")
|
||||
TSubclassOf<AActor> HealthDropClass;
|
||||
|
||||
bool HasEnemyRadio = false;
|
||||
|
||||
// -----------------------------------------------
|
||||
|
||||
@ -138,30 +161,66 @@ public:
|
||||
UFUNCTION(BlueprintCallable, BlueprintNativeEvent)
|
||||
void CollectRewards();
|
||||
|
||||
UFUNCTION(BlueprintImplementableEvent, Category = "Bounty")
|
||||
void CustomBountyAlteringEffect1();
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category = "Bounty")
|
||||
FString GetCustomBountyAlteringEffect1_Description()
|
||||
{
|
||||
return CustomAlteringEffect1_Description;
|
||||
}
|
||||
// ------------- Custom Bounty Alterations -------------
|
||||
UFUNCTION(BlueprintImplementableEvent, Category = "Bounty")
|
||||
void BuyCustomBountyAlteration_1();
|
||||
|
||||
UFUNCTION(BlueprintImplementableEvent, Category = "Bounty")
|
||||
void CustomBountyAlteringEffect2();
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category = "Bounty")
|
||||
FString GetCustomBountyAlteringEffect2_Description()
|
||||
{
|
||||
return CustomAlteringEffect2_Description;
|
||||
}
|
||||
|
||||
void BuyCustomBountyAlteration_2();
|
||||
|
||||
UFUNCTION(BlueprintImplementableEvent, Category = "Bounty")
|
||||
void CustomBountyAlteringEffect3();
|
||||
void BuyCustomBountyAlteration_3();
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category = "Bounty")
|
||||
FString GetCustomBountyAlteringEffect3_Description()
|
||||
FString GetCustomBountyAlteration_1_Description()
|
||||
{
|
||||
return CustomAlteringEffect3_Description;
|
||||
return CustomBountyAlteration_1_Description;
|
||||
}
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category = "Bounty")
|
||||
FString GetCustomBountyAlteration_2_Description()
|
||||
{
|
||||
return CustomBountyAlteration_2_Description;
|
||||
}
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category = "Bounty")
|
||||
FString GetCustomBountyAlteration_3_Description()
|
||||
{
|
||||
return CustomBountyAlteration_3_Description;
|
||||
}
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category = "Bounty")
|
||||
int GetCustomBountyAlteration_1_Cost()
|
||||
{
|
||||
return CustomBountyAlteration_1_Cost;
|
||||
}
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category = "Bounty")
|
||||
int GetCustomBountyAlteration_2_Cost()
|
||||
{
|
||||
return CustomBountyAlteration_2_Cost;
|
||||
}
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category = "Bounty")
|
||||
int GetCustomBountyAlteration_3_Cost()
|
||||
{
|
||||
return CustomBountyAlteration_3_Cost;
|
||||
}
|
||||
// ------------- Simple Bounty Alterations -------------
|
||||
|
||||
void BuySpawnAmmoDrops();
|
||||
|
||||
void BuySpawnHealthDrops();
|
||||
|
||||
void BuyEnemyRadio()
|
||||
{
|
||||
HasEnemyRadio = true;
|
||||
}
|
||||
|
||||
// Concerned Enemies will call this function, if true, play funny poop voice line and stop enemies from being concerned
|
||||
bool CheckIfHasEnemyRadio()
|
||||
{
|
||||
return HasEnemyRadio;
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user