Page 1 of 1

flying units tag or collision box check for pathfinder/movement

Posted: Mon Oct 17, 2016 8:35 pm
by kyranzor
In the Robot Army mod, I have integrated Klonan's Combat Units mod with the vanilla game style flying combat robot units.

The benefit of a flying unit is that the pathfinder doesn't need to worry about pathable areas/obstacles, and things like player's walls, transport belts (more on this later) and bodies of water become a non-issue. I want players who are frustrated with my ground-based combat droids to have a practical and useful alternative with these flying units.

Currently, I can simulate a flying unit 95% by making the collision box = {0,0}

The flying units will sometimes float over the top of walls, and pass through trees well, but the pathfinder still will not make valid paths over/through walls/trees/obstacles/bodies of water. This means that a squad of flying Defender robots will not be able to path to attack an enemy biter if the defender robot squad (aka, unit_group) is inside of an enclosed wall OR the enemy biter is located on an island with no land access.

Can we get a native way (access by a entity tag or dynamically detected when collision box = nil OR {0,0} ) to allow for an entity/unit with pathfinding capabilities to be treated as a simple unit (similar to the logistics/construction bots) for the purpose of movement?

As part of this request, a tag to disable the effects of transport belts on the unit/player would be amazing too. Thanks for your consideration!

Re: flying units tag or collision box check for pathfinder/movement

Posted: Mon Oct 17, 2016 9:40 pm
by aubergine18
Wait, collision boxes have a z-index?

Re: flying units tag or collision box check for pathfinder/movement

Posted: Mon Oct 17, 2016 9:57 pm
by kyranzor
lol my bad, it's a two-corner table. doesn't have 3 fields. I shall fix my original post.

Re: flying units tag or collision box check for pathfinder/movement

Posted: Fri Oct 21, 2016 4:53 pm
by kyranzor
bump - any ideas from devs?

Re: flying units tag or collision box check for pathfinder/movement

Posted: Sun Oct 23, 2016 10:28 am
by Earendel
Have you tried

Code: Select all

collision_mask = {}
or

Code: Select all

collision_mask = { "ghost-layer"}
Types/CollisionMask

Re: flying units tag or collision box check for pathfinder/movement

Posted: Tue Oct 25, 2016 5:13 am
by kyranzor
I tried that just now, thanks for the suggestion. It didn't work. I think the issue is at a unit pathfinder request level of the API, not really an entity mask/option issue. The entire unit_group would need to be made up of the special "flying" type unit before it could make the "no collision checks needed" pathfinder request. Right now, a flying group of units gets stuck on islands, for example.

edit: just to clarify, the units themselves CAN travel over water and walls etc with a nil or zero collision box/mask, but they cannot receive orders from the unit command API to go somewhere from A to B where the path between them is not pathable by land units. The unit API was done hastily and was only meant for land-based biters, so the code just simply isn't there for dealing with this issue. That is why i've put the request in here for Oxyd or whoever gets around to it to implement.

Re: flying units tag or collision box check for pathfinder/movement

Posted: Wed Oct 26, 2016 11:39 am
by Earendel
Can the units be modified distractor capsules instead? The main advantage of using a 'unit' type is the access to pathfinding but you don't need that for a flier.

Re: flying units tag or collision box check for pathfinder/movement

Posted: Wed Oct 26, 2016 7:57 pm
by kyranzor
The units work best for me because of their ability to be commanded and for then to form unit groups and be commanded as groups too. The API just can't handle flying groups that's all.