Page 1 of 1

Fast way to find a spawner given an entire surface/force

Posted: Sat Jul 28, 2018 3:13 pm
by Reika
Any spawner will do. In all likellihood this would be similar to the internal code used by the artillery weaponry, which also find spawners - presumably without iterating across all entities on a surface.

Re: Fast way to find a spawner given an entire surface/force

Posted: Sat Jul 28, 2018 4:16 pm
by dog80
art towers have a position and a radius so the area is clear - how you want to do that without position and radius though?

Re: Fast way to find a spawner given an entire surface/force

Posted: Sat Jul 28, 2018 4:27 pm
by Reika
dog80 wrote:art towers have a position and a radius so the area is clear - how you want to do that without position and radius though?
This prospective function could easily request that - though in my case, the radius would be infinity.

My point is that the artillery does not lag like a massive entity scan would, so they must use some internal game engine lookup that I would like exposed in the Scripting API.

Re: Fast way to find a spawner given an entire surface/force

Posted: Sat Jul 28, 2018 5:32 pm
by Klonan
Reika wrote:
dog80 wrote:art towers have a position and a radius so the area is clear - how you want to do that without position and radius though?
This prospective function could easily request that - though in my case, the radius would be infinity.

My point is that the artillery does not lag like a massive entity scan would, so they must use some internal game engine lookup that I would like exposed in the Scripting API.
The artillery scans 1 chunk per tick, slowly circling out from its own position, and searched the chunk for any targets

I would say the fastest way is to just let the C++ do it, surface.find_entities_filtered{}

Re: Fast way to find a spawner given an entire surface/force

Posted: Sat Jul 28, 2018 7:45 pm
by Rseding91

Re: Fast way to find a spawner given an entire surface/force

Posted: Sat Jul 28, 2018 11:17 pm
by Reika
That is not useful to me, because I need to find a spawner specifically, not just any enemy (which in all likelihood is a unit).

Re: Fast way to find a spawner given an entire surface/force

Posted: Sun Jul 29, 2018 3:41 am
by Rseding91
Reika wrote:
That is not useful to me, because I need to find a spawner specifically, not just any enemy (which in all likelihood is a unit).
Then there's nothing that will do that. The closest is what the artillery does but it iterates chunks of entities at a time until it finds an entity in that chunk that's a spawner or turret.