The Dark Worlds and touching the Environment Query System

Our team was having a really hard time resolving an issue with our Ranged Tower sticking to one enemy and only changing to another if that one died otherwise it would just ignore the rest. One of my teammates has spent hours upon hours on this, had extensive help from the professor but no solution was working. I was convinced they had tried everything possible and the only way to do it was to edit the engine itself in C++.

I decided to do a search and see what I came across, if anything, that might help. It was basically a shot in the dark. The first thing I took a look at was something called "Environment Query System", referenced in the Strategy Game example in the online documentation.

By utilizing this code I was able to condense 10 nodes into 3. First things first I had to turn on the experimental EQS system under Editor Preferences. Out of the whole guide to do what I did I only needed to create the Environment Query blueprint. Editing it, on the query graph add a ActorsOfClass node. Add a test, for mine I used Trace but there are five other options. Linked them together and viola that was the end of this EQS. However I was unsure how to implement. Well I fired up the editor on our Ranged Tower and took a gander at the nodes. Low and behold there was a new section of nodes called EQS. I chose the RunEQSQuery, selected the EQS I created, linked to self and linked it to our spawn projectile node.

This resolved the issue of the tower not changing targets. Now on to fixing other issues.

Update 12/13
I am sad to report that the EQS system did not fix our problems. At first glance it looked like it had with other issues coming about from it. However after further investigation we were able to discover that it was not doing anything, period. I am unsure of why it was not however one of my fellow group members was able to come up with a resolution which was previously evading us.


Popular Posts