About Store Forum Documentation Contact
Donations:
309$/mo



Post Reply 
object counter
Author Message
PRG3D Offline
Member

Post: #16
RE: object counter
At the time I write ObjectCount Tool, and I've kind problem:
[Image: errorshf.png]

is someone have experience with something similar like this.
06-09-2011 07:59 PM
Find all posts by this user Quote this message in a reply
Dandruff Offline
Member

Post: #17
RE: object counter
make sure you're using the new physx dlls located in Installation\PhysX
06-10-2011 04:36 AM
Find all posts by this user Quote this message in a reply
PRG3D Offline
Member

Post: #18
RE: object counter
I've newest PhysX files..
its code in my Tool:
Code:
Game::ObjMemx<Game::Item> turrent;
Game::ObjMemx<Game::Item> ball;

Game::World.init()
    .setObjType(turrent,OBJ_TURRENT)
    .setObjType(ball,OBJ_BALL)
    .New(path);

FAll(S + path + "/game/area", GetArea);//added into Memc<VecI2> areas new area

Flt areaSize = Game::World.areaSize();
FREPA(areas)
{
    VecI2 &xz = areas(i);
    App.name(S+i);
    Game::World.update(areaSize * xz);

    if (Grid<Game::Area> *grid = Game::World.areaActive(xz))
    {
        Game::Area &area = (*grid)();

        REP(area.objs())
        {
            if(area.obj(i).type() == OBJ_TURRENT)
            {
                numOfTurrent++;
            }

            if(area.obj(i).type() == OBJ_BALL)
            {
                numOfBall++;
            }
        }
    }
}

In game OBJ_TURRENT, and OBJ_BALL is child Game::Item.
06-10-2011 09:27 AM
Find all posts by this user Quote this message in a reply
Post Reply