Skip to content

Conversation

@ykc1n
Copy link
Contributor

@ykc1n ykc1n commented Sep 27, 2025

Transports should now load most moving allied units when they are 30 elmo from them, instead of just following them around and constantly stopping. At this value, charons should be able to consistently pick up moving glaives. Anything smaller and faster than that will still have trouble being picked up though (fleas, darts, daggers). Not really sure if that matters much though.

Also changed the code so its a bit more clear.

local lightTransport = {}
local allowTransportCache = {}
local transportLoadRangeElmo = 30
local transportLoadRangeDistanceSquared = (transportLoadRangeElmo*2)^2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why *2?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im not entirely sure how the conversion of "coordinates" to "elmos" are done. In the description of the widget (which i should probably change now..) it says "sets a distance of 8 elmo transport range", but the distance squared value that was being used was 256, which is 16 squared. So i just assumed elmos are 1/2 a pixel. I think ive seen this somewhere else as well, but not sure.

Anyways ideally, I want the "transportLoadRangeElmo" to be exactly that, a range in elmos that can be easily changed in code in the future, and then the "transportLoadRangeDistanceSquared" to handle the elmo conversion, and square it for use in the code.

Am i right about the conversion of elmos? If not I can just double the elmo variable

@GoogleFrog
Copy link
Contributor

Eg apparently https://zero-k.info/Battles/Detail/2274259

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants