top of page

Work Experience Journal - Day 22

  • Feb 6, 2019
  • 2 min read

I repeated what I did with the simple locator AI to the heavy AI and got it to work.

I figured out how to access variables in tasks from the AI blueprints by sending it through the AI controller.

I decided to add a variable for the :

Variation of the angle the bullet is fired from the gun

The max walk speed for the heavy and standard AI,

The max run speed for just the standard AI as the heavy AI only walks.

The health for both enemy types.

The time it takes for the enemy to fire so the length of the animation syncs up with the bullets fired.

I did this to make it easier for the designer to tweak and adjust the AI to their needs.

I discover how to solve an issue involving the "cast to" node. I kept connecting the "cast to shootingAI" to "get owner" when it should have been connected to "get controlled pawn". This cause the "cast to" to fail every time. Now that I have experienced that issue, I can correctly solve it.

I also experienced another issue involving behaviour trees. For some reason, one of my behaviour tree tasks showed error message saying "class not found, make sure it's saved!". Fortunately, after searching for an answer I bumped into a Unreal user called Yateam who had the same issue as me. Yateam later replied "My temporal workaround for the issue is to create task with a different name." After doing this my issue was resolved. I now know how to fix this problem if it occurs again in the future.

The issue involving the behaviour tree task

The lead developer had a look over my code and showed me a more optimised and simpler way to do but as a result this caused the issue with the AI trying to occupy the locator I was standing near or claim a locator that was already claimed to come back. I'll will have to try and fix it tomorrow.

The simple AI code after the lead developer's edits

I took a masterclass on Unreal and learned to create a online game using LAN. It was very interesting and fascinating to learn. I wish to try and do more of that in the future. This will be extremely handy when creating multiple player games on tablets and phones.

The blueprints inside my game instance
The blueprints in my player controller

Helpful links

https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/7775-blueprint-cast-to-ai-node-just-will-not-work-help

https://answers.unrealengine.com/questions/293653/behavior-tree-class-not-found-make-sure-its-saved.html

Harvard Referencing

Anon (2014) Blueprint Cast to AI node Just will not work! Help - Unreal Engine Forums. Available from: https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/7775-blueprint-cast-to-ai-node-just-will-not-work-help [Accessed 6 February 2019].

Wood, S (2019) The simple AI code after the lead developer's edits; 6 February 2019

Sarter, R (2019) Last two images; 6 February 2019

Anon (2015) Behavior Tree "class not found, make sure it's saved" - UE4 AnswerHub. Available from: https://answers.unrealengine.com/questions/293653/behavior-tree-class-not-found-make-sure-its-saved.html [Accessed 6 February 2019].

yateam. (2015) Behavior Tree "class not found, make sure it's saved". UE4 ANSWERHUB, 31 August [online]. Available from: URL [Accessed 06 February 2019].


 
 
 

Comments


bottom of page