Whenever i run this code,
void text()
{
int on;
on = 0;
if (dbKeyState (16) == 1)
{
on = 1;
}
if (on == 1);
{
dbText (0, 0, "Move the camera with the arrow keys and mouse.");
dbText (0, 10, "Jump with the left mouse button.");
float x;
float y;
float z;
//x,y,z coords
x = dbCameraPositionX();
y = dbCameraPositionY();
z = dbCameraPositionZ();
dbText (0, 30, "X Position:");
dbText (125, 30, dbStr(x));
dbText (0, 60, "Y Position:");
dbText (125, 60, dbStr(y));
dbText (0, 90, "Z Position:");
dbText (125, 90, dbStr(z));
dbText (0, 110, dbStr(on));
}
}
the game runs fine, except for this part, it just acts as if the "if (on == 1)" isn't there
i use this void during the LoopGDK
does anyone know how to get the text to change according to if the key is pressed?
p.s. i'm still relatively new to this so i'm sorry if i wasted your time