finding entities with no (0,0 0,0) colision box?

Place to get help with not working mods / modding interface.
ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

finding entities with no (0,0 0,0) colision box?

Post by ficolas »

How does game.findentitiesfiltered work? I made an entity with no colision box, and I need to search it with game.findentities, also the selection box is in a different place (colision: 0,0 - 0,0 selection 1.5,1.5 - 2, 2).
Does it look for colision box or for selection box? Or for the middle of the entity? Because it doesnt seem to work with any of those ways.

Also I think entities with no colision box still have a tiny colision box.
User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: finding entities with no (0,0 0,0) colision box?

Post by FreeER »

I've always just left the collision box off entirely (or commented it out), maybe that's messing with it? Find entities works with my 'bomber' that way, has no collision box and small-ish selection (for fuel mainly).

just noticed this in code btw

Code: Select all

// TODO there should not be entities with zero size
  // even though we have some now (projectiles)
<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
ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Re: finding entities with no (0,0 0,0) colision box?

Post by ficolas »

You mean...

Code: Select all

    collision_box = {{}, {}},
this?
Doesnt seem to work

Edit: Looked in your bike mod, tried without putting colision box as it is in your mod, but nope, still haves a little colision box, I can go throught it but I cant place entities where it is.
Edit: found something that seems to work but dont really understand it... enought I guess. (about finding entities, not the inexistent colision box)
Post Reply

Return to “Modding help”