Get AIController issue

Hi there, to anyone that can help, I am having issues with Get AIController. I can only seem to get the green node and not the blue node with the execute pins, any ideas on how to fix this or work around it?

Many thanks,
Con.

image

That’s a pure node. It doesn’t have an execute pin. You wire it’s output value to something that does have an execute pin. (Usually an IsValid or a Branch, I’d guess)

It is a pure function and will work properly.

Hi @LJMU_CGT_Development, this node is a green node and not a blue node becuase it’s a pure function. If you used or learned another coding language, people sometimes call this a const function.

The basic gist of pure functions and non functions is that pure function will not change the state of the game. For example, pure functions do not change actor location, change actor rotations, spawn actors, etc. Pure functions are usually used to get information without change anything like in the image, your getting the AIController and not changing anything. Basically setter and getter functions.

Non-pure function just basically do the opposite of pure functions.

This is just a basic gist of pure and impure functions. You can learn more in this documentation by Unreal: Functions | Unreal Engine 4.27 Documentation.

Hope this helps! :+1: