Page 1 of 1

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

Posted: Fri Dec 27, 2013 2:16 pm
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.

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

Posted: Fri Dec 27, 2013 2:32 pm
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)

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

Posted: Fri Dec 27, 2013 8:48 pm
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)