├── .gitignore ├── AIPlayerState.uplugin ├── LICENSE.md ├── README.md └── Source └── AIPlayerState ├── AIPlayerState.Build.cs ├── Private ├── AIPlayerState.cpp └── AIPlayerStateController.cpp └── Public ├── AIPlayerState.h └── AIPlayerStateController.h /.gitignore: -------------------------------------------------------------------------------- 1 | Binaries/* 2 | Intermediate/* 3 | -------------------------------------------------------------------------------- /AIPlayerState.uplugin: -------------------------------------------------------------------------------- 1 | { 2 | "FileVersion": 3, 3 | "Version": 1, 4 | "VersionName": "1.0", 5 | "FriendlyName": "AI PlayerState", 6 | "Description": "Enables player state for AI controllers", 7 | "Category": "AI", 8 | "CreatedBy": "Brandon Gandy", 9 | "CreatedByURL": "https://github.com/foszor", 10 | "DocsURL": "", 11 | "MarketplaceURL": "", 12 | "SupportURL": "", 13 | "CanContainContent": false, 14 | "IsBetaVersion": false, 15 | "Installed": false, 16 | "Modules": [ 17 | { 18 | "Name": "AIPlayerState", 19 | "Type": "Runtime", 20 | "LoadingPhase": "Default" 21 | } 22 | ] 23 | } -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Brandon Gandy 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AIPlayerState 2 | Plugin enables player state for AI controllers in Unreal Engine 4 3 | -------------------------------------------------------------------------------- /Source/AIPlayerState/AIPlayerState.Build.cs: -------------------------------------------------------------------------------- 1 | using UnrealBuildTool; 2 | 3 | public class AIPlayerState: ModuleRules 4 | { 5 | public AIPlayerState( ReadOnlyTargetRules Target ) : base( Target ) 6 | { 7 | PublicIncludePaths.AddRange( 8 | new string[] { 9 | "AIPlayerState/Public" 10 | } 11 | ); 12 | 13 | PrivateIncludePaths.AddRange( 14 | new string[] { 15 | "AIPlayerState/Private", 16 | } 17 | ); 18 | 19 | PublicDependencyModuleNames.AddRange( 20 | new string[] 21 | { 22 | "Core", 23 | "InputCore" 24 | } 25 | ); 26 | 27 | PrivateDependencyModuleNames.AddRange( 28 | new string[] 29 | { 30 | "Core", 31 | "CoreUObject", 32 | "Engine", 33 | "Slate", 34 | "SlateCore", 35 | "AIModule" 36 | } 37 | ); 38 | 39 | DynamicallyLoadedModuleNames.AddRange( 40 | new string[] 41 | { 42 | } 43 | ); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Source/AIPlayerState/Private/AIPlayerState.cpp: -------------------------------------------------------------------------------- 1 | #include "AIPlayerState.h" 2 | 3 | #define LOCTEXT_NAMESPACE "FAIPlayerStateModule" 4 | 5 | void FAIPlayerStateModule::StartupModule() 6 | { 7 | } 8 | 9 | void FAIPlayerStateModule::ShutdownModule() 10 | { 11 | } 12 | 13 | #undef LOCTEXT_NAMESPACE 14 | 15 | IMPLEMENT_MODULE(FAIPlayerStateModule, AIPlayerState) 16 | -------------------------------------------------------------------------------- /Source/AIPlayerState/Private/AIPlayerStateController.cpp: -------------------------------------------------------------------------------- 1 | #include "AIPlayerState.h" 2 | #include "AIPlayerStateController.h" 3 | 4 | AAIPlayerStateController::AAIPlayerStateController(const FObjectInitializer& ObjectInitializer) 5 | :Super(ObjectInitializer) 6 | { 7 | bWantsPlayerState = true; 8 | } 9 | -------------------------------------------------------------------------------- /Source/AIPlayerState/Public/AIPlayerState.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ModuleManager.h" 4 | 5 | class FAIPlayerStateModule : public IModuleInterface 6 | { 7 | public: 8 | 9 | /** IModuleInterface implementation */ 10 | virtual void StartupModule() override; 11 | virtual void ShutdownModule() override; 12 | }; 13 | -------------------------------------------------------------------------------- /Source/AIPlayerState/Public/AIPlayerStateController.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "AIPlayerState.h" 4 | #include "CoreMinimal.h" 5 | #include "AIController.h" 6 | #include "AIPlayerStateController.generated.h" 7 | 8 | /** 9 | * 10 | */ 11 | UCLASS(ClassGroup = AI, BlueprintType, Blueprintable) 12 | class AAIPlayerStateController : public AAIController 13 | { 14 | GENERATED_BODY() 15 | 16 | public: 17 | AAIPlayerStateController(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get()); 18 | }; 19 | --------------------------------------------------------------------------------