diff --git a/Content/Audio/Voice/1.uasset b/Content/Audio/Voice/1.uasset index 690c955..02e0a17 100644 Binary files a/Content/Audio/Voice/1.uasset and b/Content/Audio/Voice/1.uasset differ diff --git a/Content/Audio/Voice/10.uasset b/Content/Audio/Voice/10.uasset index b772ba0..05a522c 100644 Binary files a/Content/Audio/Voice/10.uasset and b/Content/Audio/Voice/10.uasset differ diff --git a/Content/Audio/Voice/11.uasset b/Content/Audio/Voice/11.uasset index 1ba5e1f..825f7b9 100644 Binary files a/Content/Audio/Voice/11.uasset and b/Content/Audio/Voice/11.uasset differ diff --git a/Content/Audio/Voice/12.uasset b/Content/Audio/Voice/12.uasset index c251753..9e88a8e 100644 Binary files a/Content/Audio/Voice/12.uasset and b/Content/Audio/Voice/12.uasset differ diff --git a/Content/Audio/Voice/13.uasset b/Content/Audio/Voice/13.uasset index f70e570..8961cb2 100644 Binary files a/Content/Audio/Voice/13.uasset and b/Content/Audio/Voice/13.uasset differ diff --git a/Content/Audio/Voice/14.uasset b/Content/Audio/Voice/14.uasset index e7da36d..19695e4 100644 Binary files a/Content/Audio/Voice/14.uasset and b/Content/Audio/Voice/14.uasset differ diff --git a/Content/Audio/Voice/15.uasset b/Content/Audio/Voice/15.uasset index 4f8be5f..78737f0 100644 Binary files a/Content/Audio/Voice/15.uasset and b/Content/Audio/Voice/15.uasset differ diff --git a/Content/Audio/Voice/16.uasset b/Content/Audio/Voice/16.uasset index 8c1fbee..28dd543 100644 Binary files a/Content/Audio/Voice/16.uasset and b/Content/Audio/Voice/16.uasset differ diff --git a/Content/Audio/Voice/17.uasset b/Content/Audio/Voice/17.uasset index c08eeef..11cc5f5 100644 Binary files a/Content/Audio/Voice/17.uasset and b/Content/Audio/Voice/17.uasset differ diff --git a/Content/Audio/Voice/18.uasset b/Content/Audio/Voice/18.uasset index fe10a94..74a27da 100644 Binary files a/Content/Audio/Voice/18.uasset and b/Content/Audio/Voice/18.uasset differ diff --git a/Content/Audio/Voice/19.uasset b/Content/Audio/Voice/19.uasset index d6d4e6a..6718421 100644 Binary files a/Content/Audio/Voice/19.uasset and b/Content/Audio/Voice/19.uasset differ diff --git a/Content/Audio/Voice/1new.uasset b/Content/Audio/Voice/1new.uasset new file mode 100644 index 0000000..78df48b Binary files /dev/null and b/Content/Audio/Voice/1new.uasset differ diff --git a/Content/Audio/Voice/2.uasset b/Content/Audio/Voice/2.uasset index 2b2330c..3a47fe9 100644 Binary files a/Content/Audio/Voice/2.uasset and b/Content/Audio/Voice/2.uasset differ diff --git a/Content/Audio/Voice/20.uasset b/Content/Audio/Voice/20.uasset index 3537a55..1ef9118 100644 Binary files a/Content/Audio/Voice/20.uasset and b/Content/Audio/Voice/20.uasset differ diff --git a/Content/Audio/Voice/21.uasset b/Content/Audio/Voice/21.uasset index 3605b1f..a5080c1 100644 Binary files a/Content/Audio/Voice/21.uasset and b/Content/Audio/Voice/21.uasset differ diff --git a/Content/Audio/Voice/22.uasset b/Content/Audio/Voice/22.uasset index ed3dacd..63bcc03 100644 Binary files a/Content/Audio/Voice/22.uasset and b/Content/Audio/Voice/22.uasset differ diff --git a/Content/Audio/Voice/23.uasset b/Content/Audio/Voice/23.uasset index f098a1a..c3fcf52 100644 Binary files a/Content/Audio/Voice/23.uasset and b/Content/Audio/Voice/23.uasset differ diff --git a/Content/Audio/Voice/24.uasset b/Content/Audio/Voice/24.uasset index ce06cbe..08964e6 100644 Binary files a/Content/Audio/Voice/24.uasset and b/Content/Audio/Voice/24.uasset differ diff --git a/Content/Audio/Voice/25.uasset b/Content/Audio/Voice/25.uasset index f26bb8e..8c38006 100644 Binary files a/Content/Audio/Voice/25.uasset and b/Content/Audio/Voice/25.uasset differ diff --git a/Content/Audio/Voice/26.uasset b/Content/Audio/Voice/26.uasset index 89244f8..5725472 100644 Binary files a/Content/Audio/Voice/26.uasset and b/Content/Audio/Voice/26.uasset differ diff --git a/Content/Audio/Voice/27.uasset b/Content/Audio/Voice/27.uasset index fa1a949..c5ec0f4 100644 Binary files a/Content/Audio/Voice/27.uasset and b/Content/Audio/Voice/27.uasset differ diff --git a/Content/Audio/Voice/28.uasset b/Content/Audio/Voice/28.uasset index d8f3676..72d6054 100644 Binary files a/Content/Audio/Voice/28.uasset and b/Content/Audio/Voice/28.uasset differ diff --git a/Content/Audio/Voice/3.uasset b/Content/Audio/Voice/3.uasset index 994c829..e873d71 100644 Binary files a/Content/Audio/Voice/3.uasset and b/Content/Audio/Voice/3.uasset differ diff --git a/Content/Audio/Voice/4.uasset b/Content/Audio/Voice/4.uasset index e866db3..ef4e78b 100644 Binary files a/Content/Audio/Voice/4.uasset and b/Content/Audio/Voice/4.uasset differ diff --git a/Content/Audio/Voice/5.uasset b/Content/Audio/Voice/5.uasset index 1284fc3..9167af5 100644 Binary files a/Content/Audio/Voice/5.uasset and b/Content/Audio/Voice/5.uasset differ diff --git a/Content/Audio/Voice/6.uasset b/Content/Audio/Voice/6.uasset index e656f5b..15ade34 100644 Binary files a/Content/Audio/Voice/6.uasset and b/Content/Audio/Voice/6.uasset differ diff --git a/Content/Audio/Voice/7.uasset b/Content/Audio/Voice/7.uasset index f3625ac..ad48c92 100644 Binary files a/Content/Audio/Voice/7.uasset and b/Content/Audio/Voice/7.uasset differ diff --git a/Content/Audio/Voice/8.uasset b/Content/Audio/Voice/8.uasset index ae1dada..c1a75e5 100644 Binary files a/Content/Audio/Voice/8.uasset and b/Content/Audio/Voice/8.uasset differ diff --git a/Content/Audio/Voice/9.uasset b/Content/Audio/Voice/9.uasset index a0d6722..95ddf45 100644 Binary files a/Content/Audio/Voice/9.uasset and b/Content/Audio/Voice/9.uasset differ diff --git a/Content/EVERYTHINGPROGRAMMINGRELATED/Blueprints/DoorButtonA_BP.uasset b/Content/EVERYTHINGPROGRAMMINGRELATED/Blueprints/DoorButtonA_BP.uasset new file mode 100644 index 0000000..d925641 Binary files /dev/null and b/Content/EVERYTHINGPROGRAMMINGRELATED/Blueprints/DoorButtonA_BP.uasset differ diff --git a/Content/EVERYTHINGPROGRAMMINGRELATED/Blueprints/DoorMultipleButton_BP.uasset b/Content/EVERYTHINGPROGRAMMINGRELATED/Blueprints/DoorMultipleButton_BP.uasset deleted file mode 100644 index 01727db..0000000 Binary files a/Content/EVERYTHINGPROGRAMMINGRELATED/Blueprints/DoorMultipleButton_BP.uasset and /dev/null differ diff --git a/Content/Levels/VillaDesign.umap b/Content/Levels/VillaDesign.umap index 880fd9f..90b5cbe 100644 Binary files a/Content/Levels/VillaDesign.umap and b/Content/Levels/VillaDesign.umap differ diff --git a/Content/Levels/VillaDesign_BuiltData.uasset b/Content/Levels/VillaDesign_BuiltData.uasset index 9d6bf80..ab6d18d 100644 Binary files a/Content/Levels/VillaDesign_BuiltData.uasset and b/Content/Levels/VillaDesign_BuiltData.uasset differ diff --git a/Source/BuildingEscape/OpenDoor.cpp b/Source/BuildingEscape/OpenDoor.cpp index cc405db..90be81e 100644 --- a/Source/BuildingEscape/OpenDoor.cpp +++ b/Source/BuildingEscape/OpenDoor.cpp @@ -9,81 +9,77 @@ // Sets default values for this component's properties UOpenDoor::UOpenDoor() { - // Set this component to be initialized when the game starts, and to be ticked every frame. You can turn these features - // off to improve performance if you don't need them. - PrimaryComponentTick.bCanEverTick = true; + // Set this component to be initialized when the game starts, and to be ticked every frame. You can turn these features + // off to improve performance if you don't need them. + PrimaryComponentTick.bCanEverTick = true; - // ... + // ... } // Called when the game starts void UOpenDoor::BeginPlay() { - Super::BeginPlay(); + Super::BeginPlay(); } // Called every frame void UOpenDoor::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) { - Super::TickComponent(DeltaTime, TickType, ThisTickFunction); + Super::TickComponent(DeltaTime, TickType, ThisTickFunction); - // ... - //if(PressurePlate->IsOverlappingActor(ActorThatOpens)) // kann nullpointer + UE4 crash geben - //if(PressurePlate && PressurePlate->IsOverlappingActor(ActorThatOpens)) //prüft erst, ob es ein actor gibt - //UE_LOG(LogTemp, Display, TEXT("%f Total Weight"), TotalMass()); - if (TotalMass() >= MassToOpenDoor) - { - UE_LOG(LogTemp, Display, TEXT("%f Total Weight"), TotalMass()); - OpenDoor(); - //DoorLastOpened When the door was opened - doorLastOpened = GetWorld()->GetTimeSeconds(); - } + // ... + //if(PressurePlate->IsOverlappingActor(ActorThatOpens)) // kann nullpointer + UE4 crash geben + //if(PressurePlate && PressurePlate->IsOverlappingActor(ActorThatOpens)) //prüft erst, ob es ein actor gibt + //UE_LOG(LogTemp, Display, TEXT("%f Total Weight"), TotalMass()); + if (TotalMass() >= MassToOpenDoor) + { + //UE_LOG(LogTemp, Display, TEXT("%f Total Weight"), TotalMass()); + OpenDoor(); + //DoorLastOpened When the door was opened + doorLastOpened = GetWorld()->GetTimeSeconds(); + } - else if(open) - { - //if door has been open longer than DoorCloseDelay - //if(GetWorld()->GetTimeSeconds() > DoorLastOpened + DoorDelay) - if (GetWorld()->GetTimeSeconds() - doorLastOpened > RotationDelay) - CloseDoor(); - } + else if (open) + { + //if door has been open longer than DoorCloseDelay + //if(GetWorld()->GetTimeSeconds() > DoorLastOpened + DoorDelay) + if (GetWorld()->GetTimeSeconds() - doorLastOpened > RotationDelay) + CloseDoor(); + } } void UOpenDoor::OpenDoor() { - FRotator rotation = GetOwner()->GetActorRotation(); - rotation.Yaw = TargetAngle; - Rotate(rotation); - open = true; + FRotator rotation = GetOwner()->GetActorRotation(); + rotation.Yaw = TargetAngle; + Rotate(rotation); + open = true; } void UOpenDoor::CloseDoor() { - FRotator rotation = GetOwner()->GetActorRotation(); - rotation.Yaw = 0.0f; - Rotate(rotation); - open = false; + FRotator rotation = GetOwner()->GetActorRotation(); + rotation.Yaw = 0.0f; + Rotate(rotation); + open = false; } float UOpenDoor::TotalMass() const { - float TotalMass = 0.f; + float TotalMass = 0.f; - //find All Overlapping Actors - TArray OverlapingActors; + //find All Overlapping Actors + TArray OverlapingActors; - if (!PressurePlate) { return TotalMass; } - PressurePlate->GetOverlappingActors(OUT OverlapingActors); + if (!PressurePlate) { return TotalMass; } + PressurePlate->GetOverlappingActors(OUT OverlapingActors); - //Add Up Their Masses - for (AActor* Actor : OverlapingActors) - { - UE_LOG(LogTemp, Display, TEXT("%s Actor"), *Actor->GetName()); - if (Actor->FindComponentByClass()->IsAnySimulatingPhysics())//probably why doors wont open - { - TotalMass =+ Actor->FindComponentByClass()->GetMass(); - } - - } + //Add Up Their Masses + for (AActor* Actor : OverlapingActors) + { + //UE_LOG(LogTemp, Display, TEXT("Actor: %s"), *Actor->GetName()); + TotalMass += Actor->FindComponentByClass()->GetMass(); + } - return TotalMass; -} \ No newline at end of file + return TotalMass; +}