Page 1 of 1

Ore deposits not detected with game.findentities

Posted: Tue May 21, 2013 4:24 pm
by ficolas
I tried to use game.findentities to increase the resources in a zone, but it didnt work.

Re: Ore deposits not detected with game.findentities

Posted: Tue May 21, 2013 4:54 pm
by kovarex
Could you be more specific?
We search for resources this way in two of our scenarios and it works.

Re: Ore deposits not detected with game.findentities

Posted: Tue May 21, 2013 5:55 pm
by ficolas
I used the tnt entity to destroy near a ore deposit, and I couldnt destroy it, it destroyed the trees, because I want to make the ore veins drop metal ores, and I doesnt work.

Re: Ore deposits not detected with game.findentities

Posted: Tue May 21, 2013 6:04 pm
by kovarex
Note, that the ore doesn't have health, so damage/die won't affect it. (I think it even writes error if you call it on entity without health).
If you want to remove it, you need to use the destroy() method, it can remove anything.

Re: Ore deposits not detected with game.findentities

Posted: Tue May 21, 2013 6:10 pm
by ficolas
kovarex wrote:Note, that the ore doesn't have health, so damage/die won't affect it. (I think it even writes error if you call it on entity without health).
If you want to remove it, you need to use the destroy() method, it can remove anything.
Oh sorry, move this to not a bug or delete it