Presentation is loading. Please wait.

Presentation is loading. Please wait.

SANWU CaiBi QQ 95766519 www.51pptmoban.com www.51pptmoban.com.

Similar presentations


Presentation on theme: "SANWU CaiBi QQ 95766519 www.51pptmoban.com www.51pptmoban.com."— Presentation transcript:

1 SANWU CaiBi QQ

2 About Me Unreal Coder.(since 2006) Three’s Gay Friend.(since 2005)
IFGames Co-Founder.(since 2013) Reading , Games , Girls , Coding , Cats ……

3 Game AI Enemies Bosses Non player Characters (NPCs) Shopkeepers
Party Members

4 Game AI SCRIPTING FINITE -STATE MACHINES (FSMS ) MESSAGING
BEHAVIOR TREE BLACK MAGIC……..

5 Unreal AI Blackboard Behavior Tree Decotrator Service Task
Al Controller Pawn Nav Mesh Testing Pawn Environment Query System

6 Unreal AI AI Perception Components
1.Add a new component called AIPerceptionStimuliSource. Then, under the Details tab, let’s select Auto Register as Source. 2.There is an AISense array. 3. Add Elenments in the array, for example, AISense_Hearing,AISense_Touch, and so on.

7 State machines in UE4 we would default to the AI Behavior Tree
But everything has BUT! Sometimes, we will break the job of Behavior Tree into components directly written in blueprint.

8 State machines in UE4 First, let’s create a new Int variable in our AIController called State. This will maintain our current state within our state machine. We now need a new event, and we will call it NextRoute. So, upon right-clicking on the event graph and going under Add Event, we will notice Add New Event. Let’s name this new event NextRoute. Now, after our assigned event ReceiveMoveCompleted, we should call NextRoute to initiate or enter the state machine:

9 State machines in UE4 Next, focusing on ReceiveMoveCompleted, let’s switch on Result. From the switch node, let’s pull Success. This means that only when the move is completed by our AI will we continue on to the next step in the execution flow. From Success, let’s create a new Branch node and set up a new condition. This condition will check whether our State Int variable currently equals 0. The value 0 represents our default state. If our State variable’s value is 0, let’s create a Retriggable Delay node and set it at 0.2 seconds. Next, we want to check whether our Current Point variable is valid; if so, we want to grab the variable we created earlier to define the next route in the linked list.

10 State machines in UE4 From there, we want to set this new variable into our Current Point variable. This will allow us to indefinitely navigate between waypoints. Next, we want to create two new variables that will be responsible for delaying the amount of time till we continue to the next route So, let’s create a new Float variable called RoutePauseDelay, which will define how long we will wait. Next, we want to create deviations so that the wait time isn’t always the same. So, now create a new Float variable called RoutePauseDevia.

11 State machines in UE4 Let’s pump RoutePauseDeviation into Random Float in Range and add this to RoutePauseDelay. Then, this will be pumped into a Delay node. From the Delay node, we want to call the NextRoute event, which we created earlier. Focusing on the newly created NextRoute event, let’s check whether our State variable is equal to 0 and create a Branch node to check the results when executed:

12 State machines in UE4 Next, we should get our AIController from our Actor, and check whether our Current Point variable is valid. Next, if our Current Point variable is valid, then we should pull from Return Value of the getAIController and Move to Actor nodes. From there, pull the Current Point variable we checked and put this into the goal of the node. Now, when the AIController takes possession of the actor it belongs to, it will call this event. Once the move is completed, it will update the route and continue to the next route.

13 Animations Dark soul

14 Animations Dark soul

15 Animations Dark soul

16 Animations Dark soul

17 Animations Dark soul

18 Custom Using Networking In Unreal Random Right Way

19 Custom Using Widget VR In Unreal UI Right Way

20 Custom NEVER use unreliable device! Using IK In Unreal
IK Right Way (In VR) NEVER use unreliable device!

21 SANWU Thanks QQ


Download ppt "SANWU CaiBi QQ 95766519 www.51pptmoban.com www.51pptmoban.com."

Similar presentations


Ads by Google