x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Any way to get EQS grid points?

Hi, I'm working on a grid based game and I just started working on EQS for my pawn movement. I'm using the PathingGrid with Distance test to find all the grid points within a certain path length radius. What I'm trying to do is to store those points in an array, so that I can then check if the input location provided by the player (which is already rounded off to match the eqs grid locations) lies within that array or not. Is there any way to retrieve those points?

Product Version: Not Selected
Tags:
more ▼

asked Jan 27 '15 at 04:57 PM in Blueprint Scripting

avatar image

Stormrage256
1k 83 75 118

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Hey Stormrage256. Check this out https://docs.unrealengine.com/latest/INT/Support/Builds/ReleaseNotes/2015/4_8/index.html

Go to AI changes and you will see that now you can use the Environment Querying System from Blueprints. That means that you can call the EQS from inside your BP and by doing so you can get all the results. alt text As you can see, you can get the Instance itself or just the Locations/Actors that were created (Hiding Spots Query Instance in the picture is an Query Instance Blackboard variable)

Make sure to: 1)chose the correct Query Template 2)chose Querier from your EnvQueryContent BP or just connect it to the AI pawn from the Event receive AI node (like i did) 3)chose Run Mode All Matching because if you chose the best you will only get one result

Also make sure to continue your logic after the query finish event because you might not get results (look at the pic)

I spend hours searching and experimenting and to be honest your post was the only one directly asking what i was looking for. So i suppose that nobody else has noted or explained how it works after the update. i also couldn't find any reference except the changelog itself. Am making my first stealth like game and i want the AI to be clever in the way its searching and not cheating because am aiming for a quality game as much as i can. If you need more help let me know

capture.png (99.9 kB)
more ▼

answered Aug 13 '15 at 09:03 PM

avatar image

D3solator
26 1 1 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

There is only a C++ way currently, but making it possible via blueprints is one of my top priorities, so stay tuned.

Cheers,

--mieszko

more ▼

answered Jan 27 '15 at 08:18 PM

avatar image

MieszkoZ STAFF
7.3k 225 57 413

avatar image Stormrage256 Jan 27 '15 at 08:42 PM

Alright, really looking forward to that. I got so excited after seeing EQS generate a perfect pathing grid space around the player. Anyways, at the moment, is it possible to check if a vector lies inside the pathing grid space through EQS? I'm sorry about too many questions, but most of the other posts and tutorials that I've gone through regarding EQS are about finding pawns in the vicinity and not about checking movement locations.

avatar image MieszkoZ STAFF Jan 28 '15 at 08:24 AM

check if a vector lies inside the pathing grid space

Not sure what you mean there. During or past EQS running a query. If "during" then the only way to supply EQS with arbitrary vectors is EQS contexts and you'd probably need to implement a custom one to fetch what you need.

If you mean "after" getting query results from EQS then you need to give me more use-case details.

--mieszko

avatar image Stormrage256 Jan 28 '15 at 08:49 AM

I meant if I could check whether a location vector lies within the pathing grid space. It doesn't matter if it's checked during or after the query. It can work either way.

What I intend to do is to use EQS to generate the area around the player character that it can move in one turn, say up to 600 unreal units or so. So when he clicks anywhere on the level, I want to check if it lies within the pathing grid space generated using EQS. If it is, I give the player the option to issue a movement command.

avatar image MieszkoZ STAFF Jan 28 '15 at 08:58 AM

This doesn't really fit EQS' responsibilities. But it sounds like naive solution would be good enough here - checking if where player clicked is within specified distance from any of generated points. There's also a bunch of easy optimizations to this approach.

Or you can use pathfinding to check if it's within distance, or query navigation system for polygons within range and test users "click" location against that. There are many ways :)

avatar image Stormrage256 Jan 28 '15 at 09:14 AM

Yes using navigation path distance was my back up option, since I'm anyways getting that data beforehand to generate the path splines from pawn location to target location. I could check the distance using that as well.

As for EQS, it's just enough for me to get the grid point data. I can compare with that as you said. Moreover with EQS point data available to me, I should be able to use it to show the navigable space to the player. With all the other methods, I would have to write separate code to handle that part.

For now, I'll go with the nav mesh path distance. Once the EQS points are exposed in Blueprints, I'll switch to that.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question