I want to position a health bar above each enemy using a for loop ...however when I run this I only see one health bar above one enemy..
not in loop:
void make_enemy_healthbars()
{
dbLoadImage("Media//Textures//green.jpg",22);
for (int j=30;j<35;j++)
{
dbMakeObjectPlane(j,12,2);
dbTextureObject(j,22);
}
}
in loop:
for (int i=10;i<15;i++) //enemys
{
for (int j=30;j<35;j++) //healthbars
{
dbPositionObject(j,dbObjectPositionX(i),dbObjectPositionY(i)+40,dbObjectPositionZ(i));
dbPointObject(j,dbCameraPositionX(),dbCameraPositionY(),dbCameraPositionZ());
}
}