Category Archives: Quick Tips

[TIP] Advanced Content Browser Search Syntax


Content Browser in Unreal Engine 4 supports advanced search syntax. The feature was introduced back in 4.9 and here is the pdf showing the list of references:
https://drive.google.com/file/d/0B6NVuVhmRCE-VHhMQ1dycXlBMWs/view

Thanks to Jamie Dale (@jdale88) from Epic Games for this useful information.

Advertisements

[TIP] Sending UDP requests to AWS Server


Hi there 🙂

In this quick tip I’ll show how to send a udp request to your Amazon EC2 server instance and then receive a reply from there. Simply put, you can use this to check if your AWS servers are online or not when player is logging in.

So what are we covering today? Well, we will write a simple UDP server in Node.js and run it on AWS EC2 server. This server will be listening on EC2’s IP on a specific port. Then in Unreal Engine 4, we will use the FUDPPing::UDPEcho method to ping the above server ip and port and see if we get a reply. Let’s get started.

Read the rest of this entry

[TIP] Dynamic Idle Animation


In this quick tip I’ll show you how to make dynamic idle animation that feels more alive. I’ll be using Sword Animset Pro by Kubold for this tutorial but you can use any animation set (or your own) as long as you have Aim Offsets.

End result:

You can create an Aim Offset from Content Browser under Animation -> Aim Offset:

After that, open your AimOffset asset you just created and set the Axis Settings. In this example, I’ll call them HorizontalAngle and VerticalAngle and set their minimum/maximum values to -90 and 90 respectively. So if the value is -90 horizontal then player will be looking to the left or if its 90 then player will look to the right. The same goes for vertical also. If its 90 then player looks up and -90 means looking down.

NOTE: For the sake of this tutorial, we will use LookAround asset that is included in Sword Animset Pro.

Now that our Aim Offsets are done its time to modify the Animation Blueprint Graph for your character. I wont be covering how to create the animation graph and assign it to your character. If you are not familiar with it you can read more about AnimGraph here.

The basic idea for this system is to create random “look at” points around our character within our vision cone (that is 90 degrees up and right) and we will use those values to drive our LookAround aim offset. In you Animation Event graph you have to create a graph like below. The comments in the screenshot should explain what the system does :). (psst click image for high resolution)

Once that setup is finished you simply have to use those values in your Anim Graph.

That’s it! You have your own Dynamic Idle Animation. You can play with all those values in Event Graph and make it more alive 🙂

[TIP] Creating your custom definitions for your UE4 games


Some developers might require their game to be different based on specific builds. For example you make a game and you want to release a demo but don’t want to include certain features. This is actually very easy to achieve. Like literally…very easy. 🙂

Open your MyProject.Build.cs file and modify it like this:

/* True if this should compile as a demo build */
const bool bIsDemoBuild = true;

/* Add a new definition called IS_DEMO_BUILD. This will be 1 (true) if bIsDemoBuild is true. Else it will be false (0) */
Definitions.Add(string.Format(“IS_DEMO_BUILD={0}”, (bIsDemoBuild ? “1” : “0”)));

Close your project solution file, right click on your *.uproject file and select Generate Visual Studio project files.

Generate Visual Studio project files.

That’s it! In your header/source files you can now use like this:

#if IS_DEMO_BUILD
UE_LOG(LogTemp, Log, TEXT(“This is a demo build”))
#else
UE_LOG(LogTemp, Log, TEXT(“This is release build”))
#endif

The good thing about this approach is its not just a simple if else condition. The compiler is actually removing the entire code inside that macro based on the condition. 🙂

%d bloggers like this: