Plugin, Functional Code Template For You

Deprecated!

The example plugin Rama provides here is old and depends on plugin descriptor version 1.0 whereas the latest is 3.0. Please refer to this community wiki guide instead: An Introduction to UE4 Plugins.

Overview

Author Rama (talk)

Dear Community,

Here is a completely functional plugin template that you can download and modify to your liking!

It is functional because it is basically a wrapper for some extra BP nodes that I like to give to my clients to use in their BP AI systems.

The whole purpose of this wiki is to provide you with a download of a simple and completely usable plugin template that you can load up and see what it does immediately, and then modify to your wishes :)

Download

Rama's AI Plugin Template

File:VictoryAI.zip

.h

Here's the list of BP nodes that come with this plugin!

/** SQUARED distanced between actors */
UFUNCTION(BlueprintPure, Category = "VictoryAILibrary")
static float Calculations__SquaredDistanceBetweenActors(AActor* Actor1,AActor* Actor2);
 
 
//~~~
 
/** Convert Rotator to Vector */
UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary", meta = (FriendlyName = "Vector To Rotator", CompactNodeTitle = "->", Keywords = "convert vector rotator conversion"))
static FRotator Conversions__VectorToRotator(const FVector& TheVector);
 
/** Convert Vector to Rotator*/
UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary", meta = (FriendlyName = "Rotator to Vector", CompactNodeTitle = "->", Keywords = "convert vector rotator conversion"))
static FVector Conversions__RotatorToVector(const FRotator& TheRotator);
 
//~~~
 
/** Set Max Move Speed. Supply the Character whose Character Movement to change! Returns false if operation could not occur due to invalid Character or MovementComponent could not be obtained.*/
UFUNCTION(BlueprintCallable, Category = "VictoryAILibrary", meta=(DefaultToSelf="TheCharacter"))
static bool CharacterMovement__SetMaxMoveSpeed(ACharacter* TheCharacter, float NewMaxMoveSpeed);
 
/** Replicated Jump Rama-Style. Use negative values for down, backward, and left. Returns false if operation could not occur. */
UFUNCTION(BlueprintCallable, Category = "VictoryAILibrary")
static bool CharacterMovement__RamaJump(ACharacter* TheCharacter, float UpAmount=3000, float ForwardAmount=3000, float RightAmount=0);
 
/** Replicated Jump Rama-Style. Directions are relative to direction to target. Forward = direct line to target. Use negative values for down, backward, and left. Returns false if operation could not occur. */
UFUNCTION(BlueprintCallable, Category = "VictoryAILibrary")
static bool CharacterMovement__RamaJumpRelativeToTarget(ACharacter* TheCharacter, AActor* Target, float UpAmount=3000, float ForwardAmount=3000, float RightAmount=0);
 
 
/** Is Controller's Pawn Falling? Returns the Controller's Pawn as a Character */
UFUNCTION(BlueprintCallable, Category = "VictoryAILibrary")
static ACharacter* CharacterMovement__ControllerPawnIsFalling(AActor* Controller, bool& IsFalling);

Conclusion

Have fun making plugins!

Rama