Tag: UE4

Distribute plugin

Reference: UE4 Plugin MarketPlace guidelines How To Package Plugins For UE4 Marketplace Contents

Read More »

UE4 dependency issues with AIController

Link error: error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl AAIController::AAIController(class FPostConstructInitializeProperties const &)" (__imp_??0AAIController@@QEAA@AEBVFPostConstructInitializeProperties@@@Z) Add AIModule as one of the project dependencies in the Build.cs file.

Read More »

7.2 – Layered Influence Map Demo

Read More »

6.3 – Buddy AI Demo 2 – Ambient Following, Taking Cover, Combat Utility

Read More »

6.2 – Buddy AI Demo 1 – Ambient Following

Read More »

2.6 – Utility Demo 2 – Target Selection

<Utility name="Utility_Test_3"> <Action id="Investigate"> <Consideration name="NotSeeEnemy"> <ResponseCurve type="Step" slope="-1" exponent="1" xshift="0" yshift="1"/> <Input id="SeeEnemy"/> </Consideration> <Consideration name="HaveLKP"> <ResponseCurve type="Step" slope="1" exponent="1" xshift="0" yshift="0"/> <Input id="HaveLKP"/> </Consideration> <Consideration name="CoolDown"> <ResponseCurve type="Polynomial" slope="0.5" exponent="2" xshift="0" yshift="0"/> <Input id="Time"/> </Consideration> </Action>…

Read More »

3.3 – GOAP Demo 1

<GOAP name="GOAP_Test_1"> <VariableList> <!– Variable List –> <Variable id="EnemyInRange" key="0" let="200"></Variable> <!– true: let; false: gt–> <Variable id="EnemyLost" key="1"></Variable> <Variable id="EnemyDead" key="2"></Variable> </VariableList> <ActionList> <!– Action List –> <Action id="Search" cost="1"> <Precondition id="EnemyLost" value="true"></Precondition> <Effect id="EnemyLost" value="false"></Effect> </Action>…

Read More »

2.3 – Utility Demo 1

<Utility name="Utility_Test_2"> <Action id="Attack"> <Consideration name="SeeEnemy"> <ResponseCurve type="Step" slope="1" exponent="1" xshift="0" yshift="0"/> <Input id="SeeEnemy"/> </Consideration> <Consideration name="NearEnemy"> <ResponseCurve type="Linear" slope="-1" exponent="1" xshift="0" yshift="1"/> <Input id="Distance"/> </Consideration> <Consideration name="HealthIsHigh"> <ResponseCurve type="Linear" slope="1" exponent="1" xshift="0" yshift="0"/> <Input id="Health"/> </Consideration> <Consideration…

Read More »

1.3 – Behavior Tree Demo 1

<BehaviorTree name="BT_Test_2"> <ActiveSelector> <Filter name="Attack"> <!– Attack the enemy if seen. –> <Condition id="SeeEnemy"/> <Action id="MoveToEnemy"/> <Action id="AttackEnemy"/> </Filter> <Filter name="Investigate"> <!– Search near last known position for 3 times. –> <Condition id="HaveLastKnownPosition"/> <Repeater limit="3"> <Sequence name="SearchNear"> <Action…

Read More »

Raycasting fails to avoid owner

UE4 uses a Collision-Trace-Channel system for raycasting (and physical collision). Interestingly, the Collision property is not only applied to “colliders”, but everything with a mesh. In order for the raycasting to work properly, you need to set the…

Read More »

0.5 – UE4 Level Setup

Top-down view for the initial level setup.

Read More »

UE4 Animation Montage

It may not be possible to modify the blend map from script (need to look into that), but driving animation in script is certainly possible. Ref: AnimMontage

Read More »

UE4 crashes when started but the project is complied successfully

Runtime error may be caused by multiple reasons. First thing is to check the Log–usually it will not show much by default. Try print debug messages to the Log and track down the problem. Some tricky cases I…

Read More »

String conversion: Fstring – std::string

std::string to FString std::string _string = "Enjoy the game"; FString _fstring(_string.c_str()); FString to std::string FString _fstring = "Enjoy the game in UE4"; std::string _string(TCHAR_TO_UTF8(*_fstring)); Other: String Conversions: FString to FName, FString to Int32, Float to FString

Read More »

Compile fails / Cannot create MyUEProject.dll in VS2017

It may due to transferring files between systems. Delete everything under /Binaries and build again.

Read More »

UE4 + VS2017

Plugin: Intro to UE4 plugin Package engine plugin Create plugin with example Library module vs. Plugin module A tutorial for packaging libraries in a plugin Static library: Create and link static library Run time: UE4 Log

Read More »

dynamic_cast fails / RTTI not enabled

UE4 / VS2017 projects don’t enable RTTI by default, and VS2017 hides the configuration in Project Properties setting for UE4 projects. Workaround is to enable UseRTTI in the Build,cs file: bUseRTTI = true; Reference: https://answers.unrealengine.com/questions/55613/how-to-enable-rtti-when-compiling-a-plugin.html

Read More »

UE4 project creation / Compile errors

Having VS 2015 Community & VS 2017 Community installed. Install C++ support for VS 2015. Create UE4 project as usual, then switch the external tool to VS 2017. Or, Uninstall VS 2015 completely with this program. Don’t try to…

Read More »
The AI Project