need help with fly unit
need help with fly unit
Hello.
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
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
sorry for my english
-
- Smart Inserter
- Posts: 1847
- Joined: Sun Feb 23, 2014 3:37 pm
- Contact:
Re: need help with fly unit
I'm pretty sure you could do this just by following the Modding Tutorial, then changing individual bits of code to suit your needs.
Re: need help with fly unit
saw this tutorial but did not understand which parameter is responsible for flight
can you tell? not very good with English
can you tell? not very good with English
sorry for my english
-
- Smart Inserter
- Posts: 1847
- Joined: Sun Feb 23, 2014 3:37 pm
- Contact:
Re: need help with fly unit
There's no parameter to control flight, you simulate it by not putting a collision box.
Re: need help with fly unit
I understand this, i'm working in a "blood-steam", and i can't make this "unit" fly, i have a problem with collision with entities.
I need this unit without collisions, like a fly unit (the command of blood-steam isn't configured yet, but is the same)
basically is a unit without collision_box and without collision_mask.
I need this unit without collisions, like a fly unit (the command of blood-steam isn't configured yet, but is the same)
basically is a unit without collision_box and without collision_mask.
Re: need help with fly unit
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 = {}
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me
Or drop into #factorio on irc.esper.net
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me
Or drop into #factorio on irc.esper.net
Re: need help with fly unit
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" }
Thank you and welcome back FreeER
Re: need help with fly unit
I've done a bit of testing around.
What kovarex wrote on the wiki:
Having either "water-tile" in car mask makes it bump into transport belts. I presume that umodded car can't get in the water and collides with buildings because of "player-layer", while belt indeed has the "water-tile".
"not-colliding-with-itself" disables collisions with entities of the same type i.e. car will pass through tank.
"not-colliding-with-itself"-only or empty collision mask will allow you to drive out of the map borders into the empty blackness of cosmos.
What kovarex wrote on the wiki:
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.
Having either "water-tile" in car mask makes it bump into transport belts. I presume that umodded car can't get in the water and collides with buildings because of "player-layer", while belt indeed has the "water-tile".
"not-colliding-with-itself" disables collisions with entities of the same type i.e. car will pass through tank.
"not-colliding-with-itself"-only or empty collision mask will allow you to drive out of the map borders into the empty blackness of cosmos.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
I also update mods, some of them even work.
Recently I did a mod tutorial.
Re: need help with fly unit
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 = {}
sorry for my english
Re: need help with fly unit
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.
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 do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
I also update mods, some of them even work.
Recently I did a mod tutorial.
Re: need help with fly unit
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.
edit: oh damn, that was meant to be edit.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
I also update mods, some of them even work.
Recently I did a mod tutorial.
Re: need help with fly unit
I didn't see this, seems I was not first one to make flying unit help post. mayhaps a mod can merge the 2 threads.
anyways take a look at the comments in the entity file for zoomer they will save you trial and error time
as for proper flying without collision:
collision_box = {{0, 0}, {0, 0}}, -- still leaves a 1 pixel collisional zone
collision_mask = {}, -- never collide, needs this to be able to 'drive' without hitting anything
until render layer is read by all types, it will still look like it goes behind trees and buildings
anyways take a look at the comments in the entity file for zoomer they will save you trial and error time
as for proper flying without collision:
collision_box = {{0, 0}, {0, 0}}, -- still leaves a 1 pixel collisional zone
collision_mask = {}, -- never collide, needs this to be able to 'drive' without hitting anything
until render layer is read by all types, it will still look like it goes behind trees and buildings
Re: need help with fly unit
Would just like to say, it would be so useful to have render_layer working for all entities.
Re: need help with fly unit
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 = {}
Collision_mask works with collision_box = nil
I hope this be helpful.
NOTE: I don't know why, transport belts aren't in object-layer, i can't do a unit fly over it