10. Creating the Player Context

Create a new Context to be used with in the Environment Query System.

On this page

While an Environment Query can generate a number of Items based on getting an Actor type, it doesn't do that for Contexts. So, we need a way to have the Player's Pawn as a Context, which is where the EnvQueryContext_BlueprintBase comes into play.


  1. Double click the PlayerContext Blueprint in the Content Browser to open it for editing.

  2. Override the ProvideActorsSet Function:


    The Override button is hidden until you mouse over the Functions portion of the My Blueprint panel.

    This will override the default behavior of the function with the Blueprint Graph that opens:


  3. Add a Get All Actors Of Class and connect it between the Provide Actor Set Node and the ReturnNode like this:


  4. Finally set the Actor Class of the Get All Actors Of Class Node to Top Down Character, Compile, and Save.

Select Skin

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback