17 Commits

Author SHA1 Message Date
6a6fd73292 Merged in main 2023-12-01 19:34:48 -05:00
af138d9110 minor refactoring 2023-12-01 19:22:59 -05:00
1a0227ff28 Enemy flings only horizontal and passenger has running ai
The enemy now can fling all types of actors so long as they can be cast to a character (player and passenger). Also, it flings to the side by a random degrees to prevent the enemy from "dribbling the player like a basketball"(moves forward, flings forward, moves forward, etc). The passenger blueprint has been made(will most likely need to be merged with whatever other one is on the main branch.) The passenger has a 25% of running in a circle, 25% of picking a random direction to face and then run in, and 50% of standing in utter panic.
2023-11-21 21:45:38 -05:00
2a13ba9adb The passenger blueprint now exists and runs in a circle 2023-11-20 20:02:40 -05:00
bf717f3942 Added proper AI and throwing player back on contact 2023-11-14 22:24:58 -05:00
f1d729c7e3 Removed timer error when unplaying game by null checking 2023-11-13 19:05:24 -05:00
1f08736dfd Organized files into proper folders 2023-11-10 23:35:04 -05:00
143f01ab92 Auto stash before merge of "main" and "origin/main" 2023-11-10 23:25:11 -05:00
dddff015be Merge branch 'main' of https://git.nugamestudioclub.com/aszema/jumping-ship 2023-11-10 23:24:23 -05:00
5799cecd53 Fixing merge errors 2023-11-10 23:23:09 -05:00
82a5093509 Merge remote-tracking branch 'origin/main' into main 2023-11-10 23:21:06 -05:00
cea63354f1 Added the grabbing and throwing functionality 2023-11-10 23:19:47 -05:00
5ebccf8700 Added baby model and Passenger tag to track when a passenger is saved 2023-11-10 22:54:48 -05:00
5ce49be574 Changed ai-detection from seeing to a fixed distance to player 2023-11-08 13:25:50 -05:00
c682a8821e Created Basic Enemy with AI and detection radius 2023-11-08 09:01:58 -05:00
41ca11d26a Trying to fix enemy movement bug 2023-11-06 19:05:45 -05:00
3b250c5dd0 Made Movement Componenet and got collision act to move 2023-10-16 19:59:56 -04:00
84 changed files with 334 additions and 19 deletions

View File

@ -0,0 +1,12 @@
[/Script/GameplayTags.GameplayTagsSettings]
ImportTagsFromConfig=True
WarnOnInvalidTags=True
ClearInvalidTags=False
AllowEditorTagUnloading=True
AllowGameTagUnloading=False
FastReplication=False
InvalidTagCharacters="\"\',"
NumBitsForContainerSize=6
NetIndexFirstBitSegment=16
+GameplayTagList=(Tag="Passenger",DevComment="")

BIN
Content/Baby.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/Blueprints/BP_Rescue_Boat.uasset (Stored with Git LFS)

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

BIN
Content/Maps/ThirdPersonMapJoel.umap (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/Materials/BabyDiaperMaterial.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/Materials/BabyEyeMaterial.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/Materials/BabyPupilMaterial.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/Materials/BabySkinMaterial.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/Materials/wood.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/Mesh/SM_Cruise_Ship.uasset (Stored with Git LFS)

Binary file not shown.

BIN
Content/Mesh/Unreal_Baby.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/MoveBlueprint.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/NewActorComponent.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/Passenger.uasset (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Content/ThirdPersonMapJoel.umap (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Content/testingActor.uasset (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,47 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "MoveComponent.h"
// Sets default values for this component's properties
UMoveComponent::UMoveComponent()
{
// 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 UMoveComponent::BeginPlay()
{
Super::BeginPlay();
// Set start location
StartRelativeLocation = this->GetRelativeLocation();
//Compute normalized movement
MoveOffsetNorm = MoveOffset;
MoveOffsetNorm.Normalize();
MaxDistance = MoveOffset.Length();
//Check if ticking required
SetComponentTickEnabled(MoveEnable);
}
// Called every frame
void UMoveComponent::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
{
Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
//Set the current distance
if (MoveEnable)
{
CurDistance += DeltaTime * Speed * MoveDirection;
if (CurDistance >= MaxDistance || CurDistance <= 0.0f) {
MoveDirection *= -1;
}
}
// Compute and set current location
SetRelativeLocation(StartRelativeLocation + MoveOffsetNorm * CurDistance);
}

View File

@ -0,0 +1,46 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Components/SceneComponent.h"
#include "MoveComponent.generated.h"
UCLASS(ClassGroup = (Actors), meta = (BlueprintSpawnableComponent))
class JUMPINGSHIP_API UMoveComponent : public USceneComponent
{
GENERATED_BODY()
public:
// Sets default values for this component's properties
UMoveComponent();
protected:
// Called when the game starts
virtual void BeginPlay() override;
public:
// Called every frame
virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
//Offset to move
UPROPERTY(EditAnywhere)
FVector MoveOffset;
private:
friend class FMoveComponentVisualizer;
// Enables the movement of the component
UPROPERTY(EditAnywhere)
bool MoveEnable = true;
//Speed
UPROPERTY(EditAnywhere)
float Speed = 1.0f;
//Computed locations
FVector StartRelativeLocation;
FVector MoveOffsetNorm;
float MaxDistance = 0.0f;
float CurDistance = 0.0f;
float MoveDirection = 1;
};

View File

@ -7,7 +7,7 @@
AjumpingshipGameMode::AjumpingshipGameMode() AjumpingshipGameMode::AjumpingshipGameMode()
{ {
// set default pawn class to our Blueprinted character // set default pawn class to our Blueprinted character
static ConstructorHelpers::FClassFinder<APawn> PlayerPawnBPClass(TEXT("/Game/ThirdPerson/Blueprints/BP_ThirdPersonCharacter")); static ConstructorHelpers::FClassFinder<APawn> PlayerPawnBPClass(TEXT("/Game/ThirdPerson/Blueprints/BP_ThirdPersonCharacterJoel"));
if (PlayerPawnBPClass.Class != NULL) if (PlayerPawnBPClass.Class != NULL)
{ {
DefaultPawnClass = PlayerPawnBPClass.Class; DefaultPawnClass = PlayerPawnBPClass.Class;