so i tried to create enemies which use the same mesh, have different objectID's, scaled to a decent size are positioned in random locations, and are added to a dynamic array of Enemy objects. For some reason, they aren't showing up anywhere.
here's what I'm doing:
void LoadEnemies()
{
float rndX = 0.0f, rndZ = 0.0f;
for (int i = 0; i <= 5; i++)
{
rndX = dbRND(300);
rndZ = dbRND(300);
if (dbRnd(10) < 5)
{
rndX = -rndX;
rndZ = -rndZ;
}
dbLoadObject("StringRay.x", i+5);
dbScaleObject(i+5,5,5,5);
enemies[i].setID(i+5);
dbPositionObject(i+5, i + rndX , 0, i + rndZ);
}
}
the i + 5 is used because objects 1 through 4 are used already and I wanted to be able to use i to index the dynamic array..
any ideas as to what's wrong?
-- from my island, aloha wau 'ia 'oe --