need help in creating a flying unit, in fact - the flying tank.
I will be grateful if someone would write a part of code or tell what flags should be used for this.
PS: want create Battle Cruiser from Starcraft
![Smile :)](./images/smilies/icon_e_smile.gif)
I noticed when I started updating the wiki tutorial to v11 that simply leaving out the collision_box didn't work (it still collided). Adding an empty collision mask property viaL0771 wrote:basically is a unit without collision_box and without collision_mask.
Code: Select all
collision_mask = {}
Ok, i tried withFreeER wrote:I noticed when I started updating the wiki tutorial to v11 that simply leaving out the collision_box didn't work (it still collided). Adding an empty collision mask property viaworked (without the collision_box, I expect it would work even with a collision_box specified though). I haven't gotten around to figuring out exactly how the new car animation works though so that's really the major delay on the tutorial update.Code: Select all
collision_mask = {}
Code: Select all
collision_mask = { "not-colliding-with-itself", "water-tile" }
Code: Select all
collision_mask = { "not-colliding-with-itself" }
should be taken literally. The presence of "water-tile" doesn't mean entity will collide with water, it means it will collide with any other entity having that layer.collision_mask
type: Types/CollisionMask
Default: Depends on Entity type
Two entities can collide only if they share a layer from the collision mask.
Thank you very much, it's helped. whether it is possible to make what unit moved above the trees and, like robots, could be attacked only range-attack.FreeER wrote:I noticed when I started updating the wiki tutorial to v11 that simply leaving out the collision_box didn't work (it still collided). Adding an empty collision mask property viaL0771 wrote:basically is a unit without collision_box and without collision_mask.worked (without the collision_box, I expect it would work even with a collision_box specified though). I haven't gotten around to figuring out exactly how the new car animation works though so that's really the major delay on the tutorial update.Code: Select all
collision_mask = {}
And zero sized tank still collides with trees which collision box covers the center of tank.Adil wrote:Flying robots can be attacked by melee units.
But they probably do have the collision mask and fly around because their collision box is zero.
See if your flying tank gets attacked at all.
edit: oh it will.
i'm using this for my flying units.Zuzak wrote:until render layer is read by all types, it will still look like it goes behind trees and buildings
Code: Select all
collision_box = nil
collision_mask = { "not-colliding-with-itself" }
Code: Select all
collision_box = nil
collision_mask = {}